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

# TPrepareDbGridCanvasEvent

Specifies an event handler which prepares the canvas for drawing a database grid.

## Declaration

Source position: dbgrids.pas line 114

`type TPrepareDbGridCanvasEvent = procedure(`
`sender: TObject;`
`DataCol: Integer;`
`Column: TColumn;`
`AState: TGridDrawState`
`) of object;`

## Arguments

`sender` |  | Control for the event notification.
`DataCol` |  | Ordinal position for the column.
`Column` |  | TColumn definition for the specified column number.
`AState` |  | Drawing state for the selection.

## Description

TPrepareDbGridCanvasEvent specifies an event handler used to prepare the canvas which draws the content in a database grid. TPrepareDbGridCanvasEvent allows an application to override or enhance the drawing behavior of cells in a database grid.

TPrepareDbGridCanvasEvent is used to implement the OnPrepareCanvas event handler in TDBGrid.

## See also

TDBGrid.OnPrepareCanvas |  | Event handler signalled to prepare the grid canvas for drawing a cell.