RadSplitter - Resize with Content

7 posts, 0 answers
  1. Felix
    Felix avatar
    3 posts
    Member since:
    Feb 2008

    Posted 18 Feb 2008 Link to this post

    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)
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 21 Feb 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thencho
    Thencho avatar
    18 posts
    Member since:
    Mar 2007

    Posted 07 Mar 2008 Link to this post

    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.
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 10 Mar 2008 Link to this post

    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
  6. Thencho
    Thencho avatar
    18 posts
    Member since:
    Mar 2007

    Posted 10 Mar 2008 Link to this post

    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.
  7. Collin
    Collin avatar
    24 posts
    Member since:
    Feb 2008

    Posted 10 Mar 2008 Link to this post

    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

  8. Murali
    Murali avatar
    1 posts
    Member since:
    Dec 2011

    Posted 01 May 2014 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017