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

# TCustomGrid.ColRowMoved

Performs actions when a column or row is moved in the grid.

## Declaration

Source position: grids.pas line 1006

`protected procedure TCustomGrid.ColRowMoved(`
`IsColumn: Boolean;`
`FromIndex: Integer;`
`ToIndex: Integer`
`); virtual;`

## Arguments

`IsColumn` |  | True if the specified index values refer to a column positions. False when they refer to row positions.
`FromIndex` |  | Ordinal position for the column or row moved in the grid control.
`ToIndex` |  | New ordinal position for the column or row after it has been moved in the grid control.

## Description

ColRowMoved is virtual method in TCustomGrid used to perform actions when a column or a row is moved in the grid control. It has an empty implementation, must be overridden in a descendent class.

ColRowMoved is called from the DoOPMoveColRow method, and occurs after Columns has been updated (when needed and enabled). It occurs before VisualChange is called or the bounds for an editor control are adjusted.

## See also

TCustomDrawGrid.ColRowMoved |  | Performs actions when a column or row is moved in the grid.
TCustomDrawGrid.OnColRowMoved |  | Event handler signalled when a column or row in the grid is moved.