RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBGridColumns.State Property

Determines whether the columns in the data grid are dependent on dataset fields.

Pascal
property State: TDBGridColumnsState;
C++
__property TDBGridColumnsState State;

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.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!