Reputation: 3941
This is something simple yet I cannot find any answer searching google !
I tried this in C#
MessageBox.Show(this.DataGridView1.CurrentRow.Cells[0].ToString());
This returns me row and column index not the value of the cell.
How to get the value instead ?
Thanks.
Upvotes: 2
Views: 3277
Reputation: 150108
You need to reference the value:
MessageBox.Show(this.DataGridView1.CurrentRow.Cells[0].Value.ToString());
Upvotes: 5