Hi All
How are you doing.. I hope everybody is doing great. Here I have a requirement that I need to add context menu to the UltraWinGrid.. Can anybody help me with that.Like how to add a context menu to the UltraWinGrid and items to that menu and How to write click events for them.
Basically I need to add two items to the context menu for the grid rows and then if the user clicks on them I need to do some functionality.
If anybody could help in gudiing me through this.. it would be really helpful.
you add a context menu strip to your design and you set the property:
ultragrid.contextmenustrip to this added contextmenustrip
The grid is no different than any other control in this regard, really. You can use a ContextMenuStrip or you could use an UltraToolbarsManager to provide context menus to controls.
The only tricky part of this with the grid is that you might want to only show the menu when the user right-clicks on a cell or a row or some other part of the grid. For something like that, you would trap the grid's MouseMove event and set the ContextMenu based on the current location of the mouse.
To determine that the mouse is over, you use the UIElements of the grid:
HOWTO:UltraWinGrid Mouse Position and Cell Identification
HOWTO:UltraWinGrid Mouse Position and Column Identification
HOWTO:UltraWinGrid Mouse Position and Row Identification