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

# TCustomGrid.OnSelection

Event handler signalled when an area is selected in the grid control.

## Declaration

Source position: grids.pas line 1314

`protected property TCustomGrid.OnSelection : TOnSelectEvent read fOnSelection write fOnSelection;`

## Description

The Col and Row parameters contain the column and the row of the highlighted cell.

Application developers can use the OnSelection and OnBeforeSelection events to react to focus changes.

## See also

TCustomGrid.OnBeforeSelection |  | Event handler signalled before changing the Selection in the grid control.
TCustomGrid.OnAfterSelection |  | Event handler signalled after a new Selection is made in the grid.