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

# TCustomDrawGrid.OnCompareCells

Event handler signalled to compare the content in cells

## Declaration

Source position: grids.pas line 1547

`public property TCustomDrawGrid.OnCompareCells : TOnCompareCells;`

## Description

Signalled from the DoCompareCells method (when assigned) when the Sort method is executed for the grid control. It occurs before the DoOPExchangeColRow method has been called yo change the order for the Columns on the grid control.

## See also

TCustomDrawGrid.ExchangeColRow |  | Exchanges column or row values at the specified positions.
TCustomGrid.DoOPExchangeColRow |  | Performs an exchange of values for the columns or rows with the specified indexes.
TCustomGrid.DoCompareCells |  | Performs a comparison between the specified cells in the grid control.
TCustomGrid.Sort |  | Sorts rows or columns in the grid.