How do I change focus of the row a datagridview control to the row that is right-clicked before a contextmenustrip option is selected or shown?
Posted on 2011-10-17
I have a context menu strip attached to a datagridview control. My context menu strip has two options, add a row or remove a row. I am able to do both successfully but I am having a problem remove the correct row when I right click on the row in question. It would only remove the row that was last selected or in other words, that I last left clicked on.
I attempted to use the mouse_click event of the datagridview control but it is executed after the menu strip options have been displayed and selected.