This is a migrated thread and some comments may be shown as answers.

onContextMenu for TreeView

2 Answers 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 18 Jul 2020, 03:56 PM

Hi all,

I'm working with the TreeView component and it only seems to have an onItemClick event. Does anyone know how to listen for an onContextMenu event so that I can open a menu for with some extra actions for the tree?

Any help is appreciated. Thanks.

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 20 Jul 2020, 09:17 PM
Well I figured it out. Looks like you need to use the item TreeViewProp and then add an onContextMenu to whatever element you return there.
0
Stefan
Telerik team
answered on 21 Jul 2020, 06:26 AM

Hello, Richard,

I`m glad to hear that a solution is found.

We also have an example made on a possible approach and include our Popup and Menu component to how a ContextMenu over.

I have attached the example for reference.

Regards,
Stefan
Progress Telerik

Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or