4 Answers, 1 is accepted
0
Hello Ollie,
Here's a dojo example, which demonstrates a possible approach for opening one ContextMenu on clicking a node's text and another menu on clicking elsewhere within the widget. The purpose of calling the close method in both menus' open event handlers is to close the other ContextMenu and to avoid having two menus open at the same time.
Regards,
Ivan Danchev
Progress Telerik
Here's a dojo example, which demonstrates a possible approach for opening one ContextMenu on clicking a node's text and another menu on clicking elsewhere within the widget. The purpose of calling the close method in both menus' open event handlers is to close the other ContextMenu and to avoid having two menus open at the same time.
Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ollie
Top achievements
Rank 1
Iron
answered on 25 Oct 2018, 01:37 PM
Hi Ivan!
Thank you for the source code! I am just wondering on how I can do the context menu on nodes. In your example, you have to right click on two different parts of the treeview to display the respective context menu.
What I am trying to achieve is, right-click on a node, get the item, check 'type' and from there display the related context menu.
Thank you for your help.
0
Hello Ollie,
If you want the ContextMenu items shown to depend on some node data, for example "type", you can do so as demonstrated in this dojo example. A single ContextMenu is used, but it is loaded with different data depending on the node's type value.
Regards,
Ivan Danchev
Progress Telerik
If you want the ContextMenu items shown to depend on some node data, for example "type", you can do so as demonstrated in this dojo example. A single ContextMenu is used, but it is loaded with different data depending on the node's type value.
Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ollie
Top achievements
Rank 1
Iron
answered on 29 Oct 2018, 02:37 PM
Thank you Ivan.
I managed to achieve what I am trying to do based on your last example.
Ollie