Conditional Style Basic Rule Demo

Conditional Styles allow you to create rules that decide how columns and rows are styled.

The Scope of the style determines where it can be applied: ie. whole row, one or more columns, or one or more column data types.

The Rule of the Style determnines if the style should be applied; when the rule is met the column / row will be styled according to the style properties provided.

Typically the Rule for the Conditional Style is based on a Predicate - only the Predicates associated with the selected scope are available.

This example has 3 Conditional Styles that use Predicates:

  • All colunns of DataType: Number have a green font when they are positive (using the 'Positive' predicate)
  • All colunns of DataType: Number have a red font when they are negative (using the 'Negative' predicate)
  • 'Item Cost' column is italicised with a yellow background where it is greater than 60 (using the 'GreaterThan' predicate)

AdapTable Help Resources:

Generating dummy data, please wait ...