Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ContextMenu for treeview node
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
ContextMenu for treeview node
Miscellaneous
Thread ID:
01071675
Message ID:
01071675
Views:
54
I have a treeview with my own custom treeviewnode class. The treeviewnode class keeps track of several things (like what type the node is). I want to display a different context menu when I right-click on node type #1 than when I right-click node type #2 and for another node type I might not even want the context menu to appear when I right-click.

I've got a feeling that I need to use the mousedown and mouseup events in conjunction with the GetNodeAt() method to determine what node was right clicked and then display (or not) the context menu based on that.

Does this seem to be the right approach? Should I create the context menus in the designer or in code? How do I display a context menu from a right-click event (without just adding the contextmenu in the property sheet)?

This seems like fun.
Semper ubi sub ubi.
Next
Reply
Map
View

Click here to load this message in the networking platform