I am implementing a contextmenu on my DataGridview. It works well but I want to make it more dynamic, so that certain items are disabled depending on the row that was right mouse clicked on, and that the menu does not appear when I click on the header row. I figured that the ContextMenuStrip's Opening event was the place to do that stuff, but I can't seem to find out which row was clicked on. I can get a reference to the menu (the sender object) and to the grid (the SourceControl property) but neither has the information I need. I have a feeling I am missing something here... Perhaps I need a different or additional event ?
The same question raises again when I am in the click events of the menu items.
The same question raises again when I am in the click events of the menu items.
Last edited: