If Session("pks") IsNot Nothing Then
Dim selectedPKs As List(Of Object) =
CType(Session("pks"), List(Of Object))
For i As Integer = 0 To selectedPKs.Count - 1
Dim selectedIdx As Integer = ASPxGridView1.
FindVisibleIndexByKeyValue(selectedPKs(i))
If selectedIdx >= ASPxGridView1.VisibleStartIndex And
selectedIdx <= ASPxGridView1.VisibleStartIndex +
ASPxGridView1.VisibleRowCount Then
ASPxGridView1.FocusedRowIndex = selectedIdx
Exit For
End If
Next i
End If
This snippet goes in the Data_Bound event so that it executes each time the user moves to a different page within the grid view.