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

Pane.ContentURL not loading

2 Answers 142 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Barb
Top achievements
Rank 1
Barb asked on 02 Aug 2008, 03:38 AM
 Very simply, I have a RadSplitter with 2 Panes each having their ContentUrl set to a different url. The first Pane has its Collapsed property set to false and the second Pane has this property set to true.

So when I run the page I see just the one Pane.

I added a button so that when the button is clicked it executes a javascript function that expands the second Pane and collapses the first.

The second Pane gets expanded but there is no content there. It is like it has not tried to load the ContentURL.

I just want to be able to show one Pane at a time, each having a different Content Url.

If I do not initially set the Collapse property of the second pane to true, I get both Panes loading their content but I do not want to see both panes on the screen at once.

thanks
-Barb

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 05 Aug 2008, 11:04 AM
Hi Barb,

I was able to reproduce the described behavior. The reason for it is that when the RadPane is initially collapsed, its sizes are calculated as for a collapsed pane - e.g its height/width is 0px. After that, when you expand it, the content url is actually loaded, but it is placed in the content wrapper DIV element of the RadPane and therefore it also has its size set to 0px and it is not visible.

You can achieve the desired functionality by setting 100% height/width of the RadPane's content wrapper DIV either by using CSS or javascript.

For your convenience I prepared and attached a sample demo project which shows the desired functionality by using CSS.

Best wishes,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Barb
Top achievements
Rank 1
answered on 09 Aug 2008, 06:36 PM
Thank you very much Svetlina  -  Sorry I did not acknowledge this reply sooner  - I will try your solution  (  how do you know these things -  I am so impressed )   -  Anyway what I did to temorarily get around the probem was to set all of the Panes ( I have several -  but only one I want to show at a time )  to expanded initially and then I set the OnClientLoaded for the splitter to a javascript function setCollaped which  then collapses all of the panes except the first one.  The only problem with the method I am using that I see is it will give a quick display of all of the panes borders ( vertical lines ) for a brief moment just before it does the collapse.

thanks again
Barb
Tags
Splitter
Asked by
Barb
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Barb
Top achievements
Rank 1
Share this question
or