Welcome Guest Search | Active Topics | Sign In | Register

Different ContextMenu depending on TreeNode?? Options
James Woodley
Posted: Thursday, January 7, 2010 12:15:48 PM
Rank: Newbie
Groups: Member

Joined: 1/7/2010
Posts: 1
Hi,

Firstly great products, keep up the good work!

Secondly, I have got the TreeView working with ContextMenus and it's fantastic, but is it possible to have a different ContextMenu depending on the Node chosen? Ideally I'd have different options depending on which Node was right clicked?

Regards
James Woodley
eo_support
Posted: Thursday, January 7, 2010 12:20:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Absolutely. The TreeView is not directly associated with a context menu in any way. It triggers ClientSideOnContextMenu event when you right click a node. Inside the event handler you can do whatever you like, to always display a context menu, to display different context menu based on the node that is clicked, or to do everything else that is possible with JavaScript. You can take a look of the source code of this sample to see how it works:

http://demo.essentialobjects.com/Default.aspx?path=TreeView\_i1\_i9

Thanks!



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.