tags:

views:

29

answers:

2

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.

+1  A: 

You need to reference the value:

MessageBox.Show(this.DataGridView1.CurrentRow.Cells[0].Value.ToString());
Eric J.
I knew I was close thanks a lot :)
programmernovice
A: 

how to refernce a value