Auto-Expand Width of TreeView's Parent Panel?

5 posts, 1 answers
  1. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 25 Aug 2010 Link to this post

    I have a situation with a Treeview that has an uneven number of branches from top to bottom.  I think this is possibly called a "jagged hierarchy"?  The user has to pick a bottom-level node.  This might be 3 levels from the top or possibly 10.  The end effect of this is that a fully opened treeview might be say 75 pixels wide or perhaps 250 pixels wide.

    Rather than me presetting the treeview width to the maximum pixels necessary, is there a way to automatically size the parent Panel (inside of which the treeview resides) when required?

    Robert
  2. Answer
    Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 26 Aug 2010 Link to this post

    Hello Robert,

    Could you please try placing your TreeView inside a div-container looking like this:
    <div style="display:inline-block;">
    ...
    </div>

    If the div doesn't have any width explicitly set on it, the container should expand in non-relative to the page manner (actually, at some point it should start expanding the page).

    Hope this is going to help you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 26 Aug 2010 Link to this post

    Nikolay,

    It works!  Thank you!!!

    By the way, VS2008 rejects "inline-block as a 'display' parameter but does allow the app to run.

    Robert
  4. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 26 Aug 2010 Link to this post

    By the way, Nikolay, I know the following technically belongs in a different forum section but ...

    Is there a way to accomplish the same "auto-expand" functionality when the RadTreeView sits inside of a RadSlidingPane?

    Robert
  5. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 31 Aug 2010 Link to this post

    Hello rmdw,

    Yes, this should be possible, if there isn't a fixed Height and Width on the RadSlidingPane or on any of the parents of the container that we set to the style "display:inline-block".

    Hope this is helpful for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top