Problems resizing a RadPane after changing the visibility of RadSplitter

2 posts, 0 answers
  1. Annie Vincent
    Annie Vincent avatar
    2 posts
    Member since:
    Feb 2008

    Posted 26 Aug 2009 Link to this post

    Hi,

     

    I have a RadSplitter with size 100%.  It contains 2 RadPanes, the first one with a height of 152px. When I resizing the browser, the second radPane size is ok.
      

    • I do a postback and change RadSplitter visibility to hide.
    • I do a second postback and change RadSplitter visibility to show. 
    • Results:  The second RadPane is not ok when I resized the browser.

     

    I have investigated RadPane control, and I found a problem with _originalHeight.

     

    I reproduce problem, look code.


     

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadPaneVisibility.aspx.cs" Inherits="BugRadPane.RadPaneVisibility" %>  
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>  
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
     
    <html xmlns="http://www.w3.org/1999/xhtml" >  
    <head id="Head1" runat="server">    
        <title></title>    
        <style type="text/css">    
        html, body, form    
        {    
          width: 100%;  
          height: 100%;    
          margin: 0;    
          paddding: 0;    
          overflow: hidden;  
        }    
            
        </style>   
    </head>   
     
    <body id="Service" style="margin: 0px; text-align: left;">    
        <form id="Form1" runat="server" method="post">   
            <asp:ScriptManager ID="RadScriptManager" runat="server"></asp:ScriptManager>  
                      
            <asp:Button ID="VisibilityOff" runat="server" Text="Off" OnClick="OnOff" />  
            <asp:Button ID="VisibilityOn" runat="server" Text="On" OnClick="OnOn" />  
              
            <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" Height="100%" Width="100%">  
                <telerik:RadPane ID="RadPane1" runat="server" Height="152px">  
                    Ruban  
                </telerik:RadPane>              
                <telerik:RadPane ID="RadPane2" runat="server">  
                    Content  
                </telerik:RadPane>  
            </telerik:RadSplitter>       
        </form>  
    </body>  
    </html> 

     

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Web;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
     
    namespace BugRadPane  
    {  
       public partial class RadPaneVisibility : System.Web.UI.Page  
       {  
          protected void Page_Load(object sender, EventArgs e)  
          {  
     
          }  
     
          protected void OnOff(object sender, EventArgs e)  
          {  
             RadSplitter1.Visible = false;  
          }  
     
          protected void OnOn(object sender, EventArgs e)  
          {  
             RadSplitter1.Visible = true;  
          }  
       }  

     

    Thanks

     

    Annie

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 31 Aug 2009 Link to this post

    Hello Annie,

    What I can suggest to get the desired result is to reset the size in the code-behind as shown below:

    protected void OnOn(object sender, EventArgs e)  
        {  
            RadSplitter1.Visible = true;  
            RadPane1.Width = Unit.Empty;  
            RadPane2.Width = Unit.Empty;  
            RadPane2.Height = Unit.Empty;  
        } 

    After I made this modification, everything started working as expected.


    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top