Using VB.Net
I want to retrieve the last row cell value
datagrid
01 Rajan
02 Vijayan
03 Suresh
Tried Code like this
For i As Integer = 0 To datagrid1.RowCount - 1
textbox1.text = datagrid1.currentrow.Cells(0).Value 'current row
textbox2.text = datagrid1.row(i).Cells(0).Value 'last row
Next
Last row is showing null
Expected Output
textbox2.text = 03
What wrong in my code, need vb.net code.
.Rows is a collection, and also works like an array, and the index numeration of arrays goes from 0 to N-1