Joseph Kim Joseph Kim - 7 months ago 9
Vb.net Question

vb.net how to get cell value from datagridview

I have a problem, how can i get value from cell of datagridview

----------------------------------
id | p/w | post |
----------------------------------
1 | 1234 | A |
----------------------------------
2 | 4567 | S |
----------------------------------
3 | 6789 | A |
----------------------------------


I want to get 3 into the textbox,how to do that? Can anyone give some example coding?
than you~

Answer

The line would be as shown below:

Dim x As Integer    
x = dgvName.Rows(yourRowIndex).Cells(yourColumnIndex).Value