I don’t think you need to create a new DataRow. Your code works, but the <b>New DataRow()</b> isn’t necessary. You can just use <b>Dim row As DataRow</b>, unless my VB is not correct. You don’t even have to put it in a variable: you can just say <b>MsgBox(grdGIV.CurrentRow.Cells(0).Value)</b>
Imported from legacy forums. Posted by Tommy (had 291 views)
The CurrentRow can be any type of row, therefore its type is “Row”. In the case where a DataRow is the CurrentRow, you would need to verify the type and cast it as a DataRow in order to access its Cell collection.
Dim row As DataRow = grid.CurrentRow
If Not row Is Nothing Then row.Cell( “myCell” ).Value End If
Imported from legacy forums. Posted by Jenny [Xceed] (had 4819 views)