Sign in Join
FPDoc Onlineexperiment

TCustomGrid.Col property

Member of TCustomGridprotectedIn unit Grids

Column index for the selected grid cell.

Declaration

pascal
property Col: Integer read FCol write SetCol;

Description

Col is an Integer which holds the column index for the current cell or grid cursor. The current grid column can be changed programmatically by setting a new value in this property.

Setting a new value for the property causes the limits for the column index to be checked when AllowOutboundEvents is set to False. An exception is raised in the CheckLimitsWithError method when the property value is not a valid column index for the grid control.

MoveExtend is called to move the selection to the cell at the coordinates in Row and Col. The cell editor is also retrieved (when available) and is displayed. The Click method is called to signal the OnClick event handler (when assigned) if the cell is not already selected or displaying a cell editor.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.