Vcl.DBGrids.TCustomDBGrid.FieldCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property FieldCount: Integer read GetFieldCount;

C++

__property int FieldCount = {read=GetFieldCount, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TCustomDBGrid

Description

Specifies the number of fields (columns) displayed in the grid.

Use FieldCount to iterate through all the field components indexed by the Fields property. FieldCount may differ from the number of fields in the underlying dataset because the grid may contain calculated fields, and not all fields in the dataset are necessarily shown in the grid. Individual fields are removed and calculated fields are added using the Columns editor at design time.

FieldCount is the same as the number of columns at runtime. At design time, the grid may contain empty columns.

See Also