How to position ContextMenu by selected row in a DataGridView on keyboard event
C#
1
Posts
1
Posters
0
Views
1
Watching
-
On the KeyDown event in a DataGridView I want to open a context menu using the Apps key, something like: if (e.KeyCode == Keys.Apps) then show the context menu by the selected row. The problem im having is how do I get the right position for the selected row to send in to the contextMenu.Show() method. When using the MouseUp event I can just use the MouseEventArgs (e.Location) to position the context menu by the selected row: contextMenu.Show((Control)sender, e.Location); Anyone know how I can accomplish this for a keyboard event?