Class: TEgFireGrid
property Columns: TEgFireGridColumns;
The columns of the grid, as stored in the form.
While Columns is empty (the default), the grid shows
default columns: one per field of the dataset whose
Visible is True, in the field order, with the
field’s DisplayLabel as title and a width from its
DisplayWidth. They are rebuilt whenever the dataset’s
fields change (the dataset is opened with other fields, for instance)
and are not stored in the form, so any change made to them in code is
lost at the next rebuild.
As soon as Columns holds at least one column, the grid
shows exactly those, in their order. A column names its field by FieldName;
a column may also name no field and show a value computed by OnBeforeDrawCell.
A column naming a field the dataset does not have shows empty cells.
At design time, double-click the grid, or choose Columns
Editor… in its menu, to edit the collection; its Add
All Fields button adds a column for every field not yet
present. Arrange Columns in the same menu lets you size
and move them on the form with the mouse. In code, use Add and AddAllFields.
EffectiveColumns
returns the columns in use (these, or the default ones); VisibleColumns
only the visible ones, in display order.