Vcl.DBGrids.TDBGridColumns.State
Delphi
property State: TDBGridColumnsState read GetState write SetState;
C++
__property TDBGridColumnsState State = {read=GetState, write=SetState, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.DbGrids.pas Vcl.DBGrids.hpp |
Vcl.DBGrids | TDBGridColumns |
Description
Determines whether the columns in the data grid are dependent on dataset fields.
If State is set to csDefault, columns in the data grid are generated dynamically from information in the grid's associated dataset. The dataset fields determine the appearance, order, and other properties of the columns. Changes made to the columns are reflected in the dataset fields, and vice versa.
If State is set to csCustomized, many properties of the data-grid columns are independent of the associated dataset. For example, a column's title caption is, by default, the same as the associated field's DisplayLabel property; if State is csCustomized, however, the column title's Caption property and the field's DisplayLabel property can be changed independently. In fact, a customized (or "persistent") column need not be associated with a dataset field at all.
Note: If the Columns editor is used to configure data-grid columns, State is automatically set to csCustomized. Changing the State property at runtime deletes all existing columns.