Class: TEgFireGrid
procedure SetColumnFormats(const AFormats: array of string);
Sets the DisplayFormat
of several columns at once.
AFormats: the format strings, one entry per column; an
empty entry leaves that column as it is. The formats apply to number and
date / time columns, as the field’s own DisplayFormat
would.
Grid1.SetColumnFormats(['', '', '#,##0.00', 'dd/mm/yyyy']);
The entries go to the columns of EffectiveColumns
in collection order (the order of the columns on screen, hidden columns
included), the first entry to the first column; entries beyond the last
column are ignored. With no explicit Columns this
changes the default columns, which are rebuilt (and lose the change)
whenever the dataset’s fields change: use it on explicit columns, or
again after each rebuild.