Sign in Join
FPDoc Onlineexperiment

TCustomDBGrid.Columns property

Member of TCustomDBGridprotectedIn unit DBGrids

Columns provides access to columns defined for the database grid control.

Declaration

pascal
property Columns: TDBGridColumns read GetColumns write SetColumns;

Description

Columns is a TDBGridColumns property that provides access to columns defined for the database grid control. Columns reimplements the property defined in the ancestor class. The items in the collection are represented as TColumn instances which are derived from TGridColumn. The TColumn instances include additional properties and methods which identify the field name, TField instance, and display format for the column. The properties defined in TGridColumn are also available.

TColumn instances in Columns can be explicitly created in the IDE at design-time, or automatically added when the OptionsExtra property includes the value dgeAutoColumns.

Use of the Columns property is not required. When left empty, the fields displayed on the grid and their attributes are retrieved directly from the linked dataset in DataLink. When columns are not used, properties like FirstColumn, LastColumn, and SelectColumn always contain Nil.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.