This question is locked. New answers and comments are not allowed.
I'm trying to add basic context menu support to my RadTreeView and am having difficulty not only figuring out how to do it, but also cannot find RadContextMenu info in your Help documentation.
My scenario is pretty basic. When the user right-clicks on the RadTreeView I want to show the context menu and only show items that are appropriate for that node. So let's say I have two nodes, and want one context menu item to show when right-clicking on the first node and the other item to show when clicking on the second.
It appears that you don't currently support the ability to associate multiple context menus with a tree view, so I suppose what I have to do is, when right-clicking, figure out which node was right-clicked on and set the visibility of the context menu items at that point.
The code in your Silverlight samples browser (http://demos.telerik.com/silverlight/#ContextMenu/FirstLook) has an event handler for the Opened event that sets the IsEnabled property for various items, so I'm guessing I could do it in this way (seems strange...shouldn't the event be called Opening instead of Opened?) but the code in the samples browser accesses the right-clicked node by calling GetClickedElement on the RadContextMenu. However, I tried this but I don't see that method on that object...even in the latest Q2 SL3 build.
Any help (or a pointer to any Help documentation) would be appreciated!
Thanks,
Ross
My scenario is pretty basic. When the user right-clicks on the RadTreeView I want to show the context menu and only show items that are appropriate for that node. So let's say I have two nodes, and want one context menu item to show when right-clicking on the first node and the other item to show when clicking on the second.
It appears that you don't currently support the ability to associate multiple context menus with a tree view, so I suppose what I have to do is, when right-clicking, figure out which node was right-clicked on and set the visibility of the context menu items at that point.
The code in your Silverlight samples browser (http://demos.telerik.com/silverlight/#ContextMenu/FirstLook) has an event handler for the Opened event that sets the IsEnabled property for various items, so I'm guessing I could do it in this way (seems strange...shouldn't the event be called Opening instead of Opened?) but the code in the samples browser accesses the right-clicked node by calling GetClickedElement on the RadContextMenu. However, I tried this but I don't see that method on that object...even in the latest Q2 SL3 build.
Any help (or a pointer to any Help documentation) would be appreciated!
Thanks,
Ross