[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'DBGrids' (#lcl)

# TCustomDBGrid.MoveSelection

MoveSelection changes the current selection in the control.

## Declaration

Source position: dbgrids.pas line 492

`protected procedure TCustomDBGrid.MoveSelection; override;`

## Description

MoveSelection causes the current selection in the control to be changed. MoveSelection calls the inherited MoveSelection method. If the selection change causes a different column to become active, the OnColEnter event handler is signalled (when assigned). MoveSelection calls the UpdateActive method to ensure that the correct row and/or column are drawn in the control.

## See also

TCustomGrid.MoveSelection |  | Signals the OnSelection event handler for a new mouse selection.