This is a migrated thread and some comments may be shown as answers.

Problems resizing a RadPane after changing the visibility of RadSplitter

1 Answer 75 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Annie Vincent
Top achievements
Rank 1
Annie Vincent asked on 26 Aug 2009, 02:55 PM

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

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 31 Aug 2009, 01:18 PM
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.
Tags
Splitter
Asked by
Annie Vincent
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or