8. Cell format
Dynamic cell type and format
-
Dynamic format
Dynamic format is turned on by <Cfg> attribute DynamicFormat
and permits changing Format, Type and similar attributes and also undo / redo these actions by users.
It shows also the format combo on default Toolbar.
-
Auto type
If set DynamicFormat
='2' it automatically chooses cell Type and optionally Format and similar attributes according to cell value.
The Type is chosen: on grid load, after value is edited by a user, after value is calculated by editable formula.
If the Type is changed, it resets also other cell attributes according to TextFormat, NumberFormat or DateFormat that points to predefined Formats list.
The type can be automatically set to "Text", "Float" or "Date". If default cell type is "Lines", it is used instead of "Text".
To choose different type than these listed, use OnFindType API event.
Predefined formats
All formats available to choose dynamically by a user and to use when automatically chooses Type by auto type.
The formats list is defined by <Cfg> attribute Formats
and its format is like JSON menu.
The Formats is also shown as menu on click to Formats combo on default toolbar.
The Formats items define usually the cell Type, Format and EditFormat, but can define nearly all other cell attributes.