Hide RadTreeViewContextMenu - RadMenuItem

1 posts, 0 answers
  1. mike
    mike avatar
    14 posts
    Member since:
    Feb 2009

    Posted 13 May 2009 Link to this post

    I have built a treeview with 2 levels.
    Level 2 has a RadTreeViewContextMenu with several RadMenuItem's - Add, edit, delete copy etc...
    The delete RadMenuItem must be hidden if there is only 1 node at level 2 within the parent.

    I am easily able to hide a RadTreeViewContextMenu - RadMenuItem with the following syntax:



    treeview.ContextMenus[i].Items[i].Visible = false;}

    but this will hide the delete RadMenuItem for ALL nodes at level 2 in all level 1 nodes.

    Is it possible to hide a RadMenuItem within a group of nodes?

    eg ..........
    Parent A
        child 1 // display delete RadMenuItem
        child 2 // display delete RadMenuItem
        child 3 // display delete RadMenuItem
    Parent B
        child 1 // HIDE the delete RadMenuItem


Back to Top