从RadWindow中删除滚动条

时间:2013-07-03 16:13:07

标签: asp.net c#-4.0 telerik

代码包含RadWindow和RadSplitter,其中有两个RadPanes。第二个窗格包含RadTextBox。 我试图从窗口中删除滚动条,我尝试了Scrolling =“None”等解决方案,固定定位,但似乎没有任何效果。

这就是我得到的。

This is what i get.

这就是我想要完成的事情

This is what i'am trying to accomplish

代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DefaultCS2.aspx.cs"  Inherits="RadControlsWebApp1.DefaultCS2" %>
 <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI"      %>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Modal Popup</title>
</head>
<body>
<form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" Skin="Office2007" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server"     DecoratedControls="All" EnableRoundedCorners="false" />

    <telerik:RadAjaxPanel runat="server" ID="rapConfiguration" LoadingPanelID="ralpConfiguration" HorizontalAlign="NotSet">
        <telerik:RadWindow ID="modalPopup" VisibleStatusbar="false" runat="server" AutoSize="true" OnClientResize="ResizeRadSplitter" OnClientCommand="ResizeRadSplitter">
            <ContentTemplate>

                <telerik:RadSplitter  ID="MainSplitter" runat="server" Height="100%" Width="100%" Orientation="Horizontal">
                    <telerik:RadPane ID="Radpane4" runat="server" Width="100%">
                        Splitter Top Pane
                    </telerik:RadPane>
                    <telerik:RadSplitBar ID="Radsplitbar4" runat="server" CollapseMode="Forward">
                    </telerik:RadSplitBar>
                    <telerik:RadPane  ID="Radpane5" runat="server" Height="100%" Scrolling="None" Width="100%">
                        <telerik:RadTextBox ID="chatBox" runat="server" TextMode="MultiLine" Resize="None" Rows="10" Width="100%"
                            EmptyMessage="type here" AutoPostBack="true" BorderStyle="None" Style="border: none; margin: 0 auto; outline: none">
                        </telerik:RadTextBox>
                    </telerik:RadPane>
                </telerik:RadSplitter><br />
            </ContentTemplate>

        </telerik:RadWindow>

    </telerik:RadAjaxPanel>
    <telerik:RadCodeBlock runat="server" ID="rdbScripts">
        <script type="text/javascript">

            function ResizeRadSplitter(sender, args) {
                var splitter = $find("<%=MainSplitter.ClientID %>");
        var container = $telerik.$(sender.get_contentElement());
        splitter.resize(container.width(), container.height());
    }
            function showDialogInitially() {
                var wnd = $find("<%=modalPopup.ClientID %>");
                wnd.show();
                Sys.Application.remove_load(showDialogInitially);
            }
            Sys.Application.add_load(showDialogInitially);
        </script>
    </telerik:RadCodeBlock>
</form>

2 个答案:

答案 0 :(得分:2)

尝试使用以下CSS,它应该可以正常工作

 <style type="text/css">
        #modalPopup_C
        {
            overflow:hidden !important;
        }
    </style>

由于 AB

答案 1 :(得分:2)

由于客户端ID的变化,上述解决方案为我提供了1次调整。我的CSS看起来像这样:

#<%=modalPopup.ClientID %>_C
{
    overflow:hidden !important;
}