FormatColumn

View as Markdown

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.

TypeScript
export interface FormatColumn extends
Extends

SuspendableObject

Properties

PropertyTypeDescriptionDefault
ColumnGroupScopeColumnGroupScopeWhen 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.
DisplayFormatDisplayFormatDisplay 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.
NamestringName of the Format Column definition
RowScopeRowScopeRow kinds to skip. Each flag excludes that kind. When omitted, data, group, summary and total rows are all included.
RulestringAdapTableQL boolean expression (evaluated per row) deciding whether to apply the Format, e.g. [price] > 100; if undefined the Format is always applied
ScopeColumnScopeWhere Format will be applied: whole Row, some Columns, or Columns of DataType
StyleAdaptableStyleColours, font and CSS class applied to the cell or header. Can be set together with DisplayFormat.
TargetFormatColumnTargetWhere in Column to apply Format (cell or columnHeader)'cell'
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (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.

TypeScript
ColumnGroupScope?: ColumnGroupScope;
Property Value

ColumnGroupScope

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.

TypeScript
DisplayFormat?: DisplayFormat;
Property Value

DisplayFormat

Name

Name of the Format Column definition

TypeScript
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.

TypeScript
RowScope?: RowScope;
Property Value

RowScope

Rule

AdapTableQL boolean expression (evaluated per row) deciding whether to apply the Format, e.g. [price] > 100; if undefined the Format is always applied

TypeScript
Rule?: string;
Property Value

string

Scope

Where Format will be applied: whole Row, some Columns, or Columns of DataType

TypeScript
Scope: ColumnScope;
Property Value

ColumnScope

Style

Colours, font and CSS class applied to the cell or header. Can be set together with DisplayFormat.

TypeScript
Style?: AdaptableStyle;
Property Value

AdaptableStyle

Target

Where in Column to apply Format (cell or columnHeader)

TypeScript
Target?: FormatColumnTarget;
Default Value

'cell'

Property Value

FormatColumnTarget

IsSuspended

Inherited from SuspendableObject

Suspends (i.e. turns off) an Adaptable Object

TypeScript
IsSuspended?: boolean;
Property Value

boolean

IsReadOnly

Inherited from AdaptableObject

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

TypeScript
IsReadOnly?: boolean;
Property Value

boolean