I am using the GridView - AutoGenerateSelectButton = \"True\"
to select the row in order to get the Column 1 cell value.
I have tried:
I was looking for an integer value in named column, so I did the below:
int index = dgv_myDataGridView.CurrentCell.RowIndex;
int id = Convert.ToInt32(dgv_myDataGridView["ID", index].Value)
The good thing about this is that the column can be in any position in the grid view and you will still get the value.
Cheers
Have you tried Cell[0]
? Remember indexes start at 0, not 1.