Vcl.Grids.TCustomGrid.Col

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Col: Longint read FCurrent.X write SetCol;

C++

__property int Col = {read=FCurrent.X, write=SetCol, nodefault};

Properties

Type Visibility Source Unit Parent
property protected
Vcl.Grids.pas
Vcl.Grids.hpp
Vcl.Grids TCustomGrid

Description

Specifies the index of the column that contains the selected cell.

Use Col at runtime to determine the current column in the grid. Setting Col moves focus to the cell in the current row that is in the new column. The first column has an index of 0, the second column an index of 1, and so on.

The selected cell in the grid can be located by reading the Col property and the Row property to obtain the indexes of its column and row. When focus moves to the grid, the selected cell gets input focus.

See Also

Code Examples