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

# TCustomDBGrid.ColRowMoved

Signals event handlers when a row or a column is moved in the grid control.

## Declaration

Source position: dbgrids.pas line 424

`protected procedure TCustomDBGrid.ColRowMoved(`
`IsColumn: Boolean;`
`FromIndex: Integer;`
`ToIndex: Integer`
`); override;`

## Arguments

`IsColumn` |  | True if a column affected in the method. False if a row is affected.
`FromIndex` |  | Original ordinal position for the column or row moved in the method.
`ToIndex` |  | New ordinal position for the column or row moved in the method.

## Description

ColRowMoved is an overridden procedure used to signal event handlers when a row or a column is moved in the grid control. When IsColumn contains False, the OnRowMoved event handler is signalled (when assigned). When IsColumn contains True, the OnColumnMoved event handler is signalled (when assigned) if Columns have not been Enabled in the grid control. If Columns have been Enabled, the inherited ColRowMoved method is called.

## See also

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