Groups | Blog | Home
all groups > vb.net data > february 2006 >

vb.net data : VS2005 DataGridView Selecting Cell Contents


Kimbo
2/25/2006 12:00:00 AM
Hi

I have a small program with a DataGridView that displays two columns
of data, I want to be able to double click on any row and get the data
that is in the first column position of the current selected row. I
could do this quite easily in Vs2003 with a Datagrid but cannot work
it out for a DataGridView.

Any help would be appreciated.

Regards
bholdrid NO[at]SPAM isbe.net
2/27/2006 8:07:31 AM
Try
DataGridView1.CurrentRow.Cells(0).Value
where 0 (zero) is the column index. This should get the data in the
first column in the selected row. You can retreive the data in other
columns by changing the column index.

Brian
AddThis Social Bookmark Button