I am doing this:
Dim
SaveFocusedRow As Object
Dim RowHandle As IntegerSaveFocusedRow = gvHdr.GetRow(gvHdr.FocusedRowHandle)
grdHdr.Requery()
RowHandle = FindRowHandleByRowObject(gvHdr, SaveFocusedRow) If RowHandle <> DevExpress.XtraGrid.GridControl.InvalidRowHandle Then
gvHdr.FocusedRowHandle = RowHandle
End IfBut it's not able to find the row in the list, it keeps returning back InvalidRowHandle. I originally did go to DevExpress help and this was what I was told to do. However, it's not working so I wasn't sure if there was something in the EnhancedList conflicting with it or something else that I could use instead. I'll keep looking...this seems like it should be easy but it's proving to be rather difficult.
The FindRowHandleByRowObject Function is defined as below:
Private
Function FindRowHandleByRowObject(ByVal view As DevExpress.XtraGrid.Views.Grid.GridView, ByVal row As Object) As Integer If Not row Is Nothing Then
For i as Integer = 0 To view.DataRowCount - 1
If row.Equals(view.GetRow(i)) Then Return i
Next
End If
Return DevExpress.XtraGrid.GridControl.InvalidRowHandleEnd Function