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.

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top