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

RadSplitter - Resize with Content

6 Answers 349 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Felix
Top achievements
Rank 1
Felix asked on 18 Feb 2008, 06:44 PM
Hey there!

I actually have searched the whole forum and found no specific solution to my problem - even though I am sure, somebody else has the same needs I do.

I have a header, a footer and a content Div in the middle with a Splitter control. Setting width and height to 100% with height offset (just like in your example) works fine, but then depending on the height of the content each pane has its own scrollbar.

My goal is to have one scrollbar for the whole page, so the splitter should resize its height according to the content of the "longest" pane. I just found a solution here with javascript getting the inner height of the panes, but this does not work on runtime (for example with an accordeon control inside the pane!). Is there any other chance to basically make the splitter to not define the height of the splitter-table at all? That would be the easiest solution for me by far, because then every browser would resize the splitter-table perfectly according to the content.

Thanks a lot in advance, sincerely,

Felix (from Germany, excuse my english)

6 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 21 Feb 2008, 04:36 PM
Hello Felix,
The RadSplitter control does not offer the functionality you look for. You can implement it however, using javascript and the client-side api of the control. I am not quite sure why the solution you found does not provide the desired effect. In case you could prepare and send us a simple running project, demonstrating the problem you face, we will do our best to help you get the desired result.

Kind regards,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Thencho
Top achievements
Rank 1
answered on 07 Mar 2008, 05:47 PM
Hello

I have the same problem, but in my application I create a lot of controls dinamically and I want to the pane has the same height that the controls panel, I read that maybe can do it whit a javascript function that catch the panel height and put the same height to the pane. But I don't know how to do this.

Thanks for all.
0
Svetlina Anati
Telerik team
answered on 10 Mar 2008, 03:40 PM
Hi Thencho,

I prepared a simple project which demonstrates this behavior - you can find it in the attached archive file.
In the sample project there is a RadSplitter with 300px initial height. A content page with a bigger height is loaded in the RadPane and the RadPane is resized to the proper size, so no vertical scrollbar appears.

Feel free to modify the example in order to meet your requirements.


Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Thencho
Top achievements
Rank 1
answered on 10 Mar 2008, 03:49 PM
Hi Svetlina

Finally I do this with a JavaScript function like this

function

resize()

{

document.getElementById(

"PaneCabecera").style.height = document.getElementById("pnlCabecera").offsetHeight;

document.getElementById(

"RAD_SPLITTER_PANE_CONTENT_PaneCabecera").style.height = document.getElementById("pnlCabecera").offsetHeight;

}


In this function I execute in the body load, and I catch the final height from my panel.

Bye.
0
Collin
Top achievements
Rank 1
answered on 10 Mar 2008, 04:31 PM
Hi Thencho,

   Great script, but I'm not sure that offsetHeight is 100% cross browser, just an FYI, this probably doesn't matter in most cases.  If you are stuck supporting browsers like Opera or Safari, this might help.

http://www.cross-browser.com/x/lib/view.php?s=xheight

0
Murali
Top achievements
Rank 1
answered on 01 May 2014, 01:13 PM
I have 3 pane in the Page and for the Middle page enabled the Scrolling="Y" but when the scroll bar is visible i want reducing width of the Control so it possible to find the in Server side weather the scroll bar for the middle pane present or not?

Thanks
Krishna.
Tags
Splitter
Asked by
Felix
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Thencho
Top achievements
Rank 1
Svetlina Anati
Telerik team
Collin
Top achievements
Rank 1
Murali
Top achievements
Rank 1
Share this question
or