Retrive value from datagrid
We can retrive datagrid value by using the following code:
datagridviewname[columinder,rowindex].value.toString();
in dot net
try!
it will work
We can retrive datagrid value by using the following code:
datagridviewname[columinder,rowindex].value.toString();
in dot net
try!
it will work
I tried this and it WORKED as expected...great tip. But have one question. how do you handle if the cell has a NULL value? thanks in advance for your suggestion.
here is sample code i'm using
Dim dgstring As String
If DataGridView3.Tag = 0 Then
For i = 0 To DataGridView3.Columns.Count - 1
dgstring = dgstring & DataGridView3(columnIndex:=i, rowIndex:=1).Value.ToString()
Next
End If