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

Auto-Expand Width of TreeView's Parent Panel?

4 Answers 100 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 25 Aug 2010, 05:11 AM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Tsenkov
Telerik team
answered on 26 Aug 2010, 04:39 PM
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
0
Robert
Top achievements
Rank 1
answered on 26 Aug 2010, 07:18 PM
Nikolay,

It works!  Thank you!!!

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

Robert
0
Robert
Top achievements
Rank 1
answered on 26 Aug 2010, 09:29 PM
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
0
Nikolay Tsenkov
Telerik team
answered on 31 Aug 2010, 03:37 PM
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
Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Robert
Top achievements
Rank 1
Share this question
or