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

TreeNodes and DropDown Menu

3 Answers 135 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Mickey Keenan
Top achievements
Rank 1
Mickey Keenan asked on 02 May 2007, 04:57 PM
I am using the treeview control (nice by the way), and I want to add a drop down menu to the nodes, and that menu may have 5 items... but only some of them are shown based on the properties of the node... For instance, I want to hide 2 items, when the node is checked for instance.  The problem is Setting the Visibility to Hidden, hides the node, but leaves a blank space in the menu...  Is there a way to get rid of that behavior

3 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 03 May 2007, 06:21 AM
Hi Mickey Keenan,

The solution is to change the Visibility property of the menu items in the dropDown, not the RadTreeNode Visibility property.

I hope this helps.
If you need further assistance please write us back.




Sincerely yours,
Ray
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mickey Keenan
Top achievements
Rank 1
answered on 03 May 2007, 04:28 PM
THat is what I am doing... When I change the menuItem visibility to Hidden I get blank lines... like so

Menu 1

Menu 3

instead of

Menu1
Menu 3

I have a sample project that illustrats this.  But just add some nodes to a tree view, add a DropDownMenu with 5 menu buttons.  Then Hide Menu 2 and 4, and add the DropDownMenu to those nodes...
0
Boyko Markov
Telerik team
answered on 04 May 2007, 07:34 AM
Hello Mickey Keenan,

Visibility property is of type ElementVisibility which is an enum type that have  three different states - Visible, Hidden and Collapsed.  You will need to set the Visibility property to ElementVisibility.Collapsed instead of ElementVisibility.Hidden. That is because setting the property to ElementVisibility.Hidden just hides the item but its size is still calculated in the layout. When you set the property to ElementVisibility.Collapsed the size of the item is no longer respected by the layout and there won't be any blank space.
I hope this helps.

All the best,
Ray
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Treeview
Asked by
Mickey Keenan
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Mickey Keenan
Top achievements
Rank 1
Share this question
or