RadSplitter hiding controls on PostBack?

3 posts, 0 answers
  1. Kns
    Kns avatar
    2 posts
    Member since:
    May 2016

    Posted 28 May Link to this post

    Hi

    The below renders inside a usercontrol with the label on initial load, but on postback, the button disappears.  The source info of the browser still contains the control, however.  The same happens for any control put into the LeftPane.

    Am i doing something wrong or a bug?

    Thanks

    J

     

    <telerik:RadSplitter RenderMode="Lightweight" ID="RadSplitter1" runat="server" Width="100%" Height="100%">

                <telerik:RadPane ID="LeftPane" runat="server" Width="200px">

                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

                </telerik:RadPane>

                <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward">
                </telerik:RadSplitBar>

                <telerik:RadPane ID="EndPane" runat="server" Height="500px">

                        <div id="mapcanvas" style="height: 500px">
                        </div>

                </telerik:RadPane>

            </telerik:RadSplitter>

  2. Kns
    Kns avatar
    2 posts
    Member since:
    May 2016

    Posted 28 May in reply to Kns Link to this post

    * I mean label disappears
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1385 posts

    Posted 31 May Link to this post

    Hi Kns,

    The experienced problem can be caused because of not properly set dimensions of the Splitter's wrapper elements. When you are configuring RadSplitter's height in percentages you have to make sure that all of its parents size is also set in percentages (up to a parent with a fixed height). In case you do not use any fixed height wrapper, you will need to include the following style:
    html, body, form
    {
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
    }

    Once you configure the height of the Splitter proeprly, the label element will remain visible on PostBack. I hope this helps.

    Regards,
    Vessy
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top