Jinith
Jinith

Reputation: 438

Janus Gridex Winforms control right click menu

I am looking for some help where I can get a menu option on right clicking a row on Janus WinForms Gridex control to trigger some code. Any one has some ideas ?

Basically I want to include options like Edit / Delete / Process on each row's right click menu option. How do we enable this? I have seen in compiled code samples that it is possible.

Upvotes: 0

Views: 1871

Answers (2)

Daniel Roberto
Daniel Roberto

Reputation: 51

First, Add a ContextMenuStrip on your form and add the menu item/s you want. Second, set the MouseClick event for the grid,in the event use the following code:

if (e.Button == MouseButtons.Right){ contentMenuStrip.Show(Cursor.Position);}

Finally, set the click event for the menu item and input you code.

Upvotes: 2

Arthur Rizzo
Arthur Rizzo

Reputation: 333

You can add a ContextMenuStrip on your form and set it up the way you want it. After that, set set property ContextMenuStrip on the GridEX to the ContextMenuStrip you created. That's it.

Upvotes: 2

Related Questions