I want to store on a variable the value of the first column of a row whenever I click on a cell.
Asked
Active
Viewed 769 times
1 Answers
1
You can try this code :
private void MyDataGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
var val = MyDataGrid.Rows[e.RowIndex].Cells[0].Value;
}
Hope this help you.

Francois Borgies
- 2,378
- 31
- 38