Hello, Hengky,
The CurrentRow.Index property gives the index of the current row in the active view. According to the provided information, it is not clear how exactly you add a new row. If you use the new row you can use the UserAddedRow event. This event fires when the user has finished adding a new row and the row is successfully added to the grid. In this event, you have access to the Row.Index.
Private Sub RadGridView1_UserAddedRow(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
Dim index As Integer = e.Row.Index
End Sub
Here is another example, if you add a new row on a button click:
Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
radGridView1.Rows.Add(2, "Davolio", "Nancy", "Table", 1)
Dim index = Me.radGridView1.CurrentRow.Index
End Sub
RadGridView offers the CurrentRowChanged event as well. It fires when the current row has changed. Here you have access to the old row and the new current row. Feel free to use it if it is suitable for you.
Private Sub RadGridView1_CurrentRowChanged(ByVal sender As Object, ByVal e As CurrentRowChangedEventArgs)
Dim currentRowIndex = e.CurrentRow.Index
Dim oldRowIndex = e.OldRow.Index
End Sub
If the suggested solutions, however, do not help you I would kindly ask you to provide more information or code snippet how exactly you add rows in your grid.
I hope this information is useful. Let me know if I can assist you further.
Regards,
Nadya
Progress Telerik