I have a data grid view populated with values. What I want to do is to right click item in data grid view, get a context menu to pop up, there I should select a menu item to get a first cell of selected row.
I managed to make context menu and its item, so I'm good there. What I need to do is to somehow get the value of first row while selecting said item.
I tried to use cell click method to get it and it works, but I have no clue how to implement it to menu item click.
string value = ((DataGridView)sender).Rows[e.RowIndex].Cells[0].Value.ToString();