TreeNodes and DropDown Menu

4 posts, 0 answers
  1. Mickey Keenan
    Mickey Keenan avatar
    7 posts
    Member since:
    Jan 2006

    Posted 02 May 2007 Link to this post

    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
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 03 May 2007 Link to this post

    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
  3. Mickey Keenan
    Mickey Keenan avatar
    7 posts
    Member since:
    Jan 2006

    Posted 03 May 2007 Link to this post

    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...
  4. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 04 May 2007 Link to this post

    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
Back to Top