FormatColumn
Colours a cell, changes how its value is displayed, or both.
Scope is required. Style and DisplayFormat can be set together. Omit Rule to apply the format on every row in scope. Target defaults to 'cell' ('columnHeader' formats the header). Suspend with IsSuspended.
export interface FormatColumn extendsExtends
Properties
| Property | Type | Description | Default |
|---|---|---|---|
| ColumnGroupScope | ColumnGroupScope | When a format applies to a column inside a column group. Omit it to apply the format whether the parent group is expanded or collapsed. 'Expanded' applies only while the parent group is expanded. 'Collapsed' applies only while it is collapsed. 'Both' applies in either state. A column that is the only leaf of a top-level group ignores an explicit scope. | |
| DisplayFormat | DisplayFormat | Display Format to apply to Column. Can be a concrete AdaptableFormat(Numeric, String or Date) or the name of a numeric preset such as 'Percentage', 'Thousand', 'Million', 'Dollar', 'Sterling',which is resolved at render time. | |
| Name | string | Name of the Format Column definition | |
| RowScope | RowScope | Row kinds to skip. Each flag excludes that kind. When omitted, data, group, summary and total rows are all included. | |
| Rule | string | AdapTableQL boolean expression (evaluated per row) deciding whether to apply the Format, e.g. [price] > 100; if undefined the Format is always applied | |
| Scope | ColumnScope | Where Format will be applied: whole Row, some Columns, or Columns of DataType | |
| Style | AdaptableStyle | Colours, font and CSS class applied to the cell or header. Can be set together with DisplayFormat. | |
| Target | FormatColumnTarget | Where in Column to apply Format (cell or columnHeader) | 'cell' |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') | |
| IsSuspended | boolean | Suspends (i.e. turns off) an Adaptable Object |
Property Details
ColumnGroupScope
When a format applies to a column inside a column group.
Omit it to apply the format whether the parent group is expanded or collapsed. 'Expanded' applies only while the parent group is expanded. 'Collapsed' applies only while it is collapsed. 'Both' applies in either state. A column that is the only leaf of a top-level group ignores an explicit scope.
ColumnGroupScope?: ColumnGroupScope;Property Value
DisplayFormat
Display Format to apply to Column. Can be a concrete AdaptableFormat
(Numeric, String or Date) or the name of a numeric preset such as
'Percentage', 'Thousand', 'Million', 'Dollar', 'Sterling',
which is resolved at render time.
DisplayFormat?: DisplayFormat;Property Value
Name
Name of the Format Column definition
Name: string;Property Value
string
RowScope
Row kinds to skip. Each flag excludes that kind. When omitted, data, group, summary and total rows are all included.
RowScope?: RowScope;Property Value
Rule
AdapTableQL boolean expression (evaluated per row) deciding whether to apply the Format, e.g. [price] > 100; if undefined the Format is always applied
Rule?: string;Property Value
string
Scope
Where Format will be applied: whole Row, some Columns, or Columns of DataType
Scope: ColumnScope;Property Value
Style
Colours, font and CSS class applied to the cell or header. Can be set together with DisplayFormat.
Style?: AdaptableStyle;Property Value
Target
Where in Column to apply Format (cell or columnHeader)
Target?: FormatColumnTarget;Default Value
'cell'
Property Value
IsSuspended
Inherited from SuspendableObject
Suspends (i.e. turns off) an Adaptable Object
IsSuspended?: boolean;Property Value
boolean
IsReadOnly
Inherited from AdaptableObject
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsReadOnly?: boolean;Property Value
boolean