ContextMenu on treeview nodes

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Sep 2008

    Posted 22 Sep 2008 Link to this post

    How do you add a RadContextMenu to a node in the treeview?

    The RadContextMenuManager allows you to add a RadContextMenu to the RadTreeView control but that only gives you the ability to add a context menu to the whole control regardless of where it is clicked.

    The RadTreeNode has a ContextMenu property but it is of type RadDropDownMenu which has previously been said to be obsolete.  Since the RadDropDownMenu is no longer part of the Toolbox, manually changing the RadContextMenu to a RadDropDownMenu allows it to be added to a treeview node but this does not seem to be the correct way to do this. 

    radTreeNode1.ContextMenu = radDropDownMenu;

    Are there any other ways to do this?

  2. Jordan
    Jordan avatar
    547 posts

    Posted 25 Sep 2008 Link to this post

    Hi David,

    Indeed, at the moment RadTreeView uses the RadDropDownMenu class for context menus, and you have to manually change the code as you mention.

    We are aware of that issue and it is scheduled to be fixed for the Q3 2008 release of RadControls for WinForms.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top