Posted 1 June 2022, 8:47 pm EST
Hi guys.
I’m building a Windows app in VB.net.
On a form, I have a C1ContextMenu with a number of commands added, opening on the right click of a TrueDBGrid.
To know which row of the grid was clicked, I am setting a variable on the Mouse_Move event of the grid, and then I use that var in the event code of the menu’s click to get the row’s values.
It works most of the time, but if the user moves the mouse outside of the menu once the menu is opened, the Row variable is changed resulting in the wrong row being referenced.
Is it possible to test for the menu already being open in the Mouse_Move event, or is there a better way to capture the grid’s row?
Thanks.