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

# TCustomDBGrid.OnCellClick

Event handler signalled for a mouse click in a grid column.

## Declaration

Source position: dbgrids.pas line 524

`protected property TCustomDBGrid.OnCellClick : TDBGridClickEvent read FOnCellClick write FOnCellClick;`

## Description

OnCellClick is a TDBGridClickEvent property that contains the event handler signalled when a mouse button is clicked in a cell for the grid control. Assign a procedure to the OnCellClick property to respond to mouse click messages in a column for the grid control. The column number for the clicked cell is passed as an argument to the handler routine.

OnCellClick is signalled from the CellClick method, and occurs for Left mouse button clicks only.

## See also

TCustomDBGrid.CellClick |  | CellClick calls the OnCellClick event handler if it is assigned for this particular cell.
TDBGridClickEvent |  | Specifies an event handler signalled when a grid column in is clicked.