Hi Philip,
This behavior can be avoided by handling the MoveCurrentCellDirection event of the GridControl. In the event handler, check the Direction when the ctr+end is pressed and accordingly move the currentcell to the lastvisiblerow row. Please try the below code.
Private Function GetLastVisibleRow(ByVal grid As GridControl) As Integer
Dim lastRow As Integer = -1
For row As Integer = grid.RowCount To 1 Step -1
If (Not grid.Rows.Hidden(row)) Then
lastRow = row
Exit For
End If
Next row
Return lastRow
End Function
Private Sub gridControl1_MoveCurrentCellDirection(ByVal sender As Object, ByVal e As GridMoveCurrentCellDirectionEventArgs)
If e.Direction = GridDirectionType.BottomRight Then ' ctrl + End
e.Result = False
e.Handled = True
Dim lastVisibleRow As Integer = GetLastVisibleRow(gridControl1)
Me.gridControl1.CurrentCell.MoveTo(lastVisibleRow, gridControl1.ColCount, GridSetCurrentCellOptions.ScrollInView)
End If
End Sub
Let me know if this helps.
Regards,
Rajagopal