all groups > vb.net controls > may 2006 >
You're in the

vb.net controls

group:

Retrieving Data From DataGridView


Retrieving Data From DataGridView Microsoft
5/22/2006 12:00:00 AM
vb.net controls:
Hi I am trying to get at the data contained within a selected row.

i have got the DGV to fill adn allow me to select a complete row, but I now
need the values contained within the cells to assign into another area of
the form... can anybody please tell me the syntax for getting the physical
data

e.g

Textbox.text = DGV.SelectedRow.Colum.text

i understand this is not correct but it gives the idea of what I am trying
to do

Please help... oh im using VB.NET 2.0

thanks

michael

Re: Retrieving Data From DataGridView Ranko
5/22/2006 6:38:47 PM
[quoted text, click to view]
Textbox.text = DataGridView1.CurrentRow.Cells(index of column).Value
example for first column: Textbox.text =
DataGridView1.CurrentRow.Cells(0).Value
or
AddThis Social Bookmark Button