FormatOptions class (Pivot)

FormatOptions()

new FormatOptions()

The FormatOptions type holds options a pivot-column can be formated as
FormatOptions

Members

(static) expression :string

The expression field defines the conditional format or the format to display the cell/column's content. The expression supports the following keywords:
value, gets the value of the cell being formatted/evaluated
The expression supports the following variables:
%0, %1, %2, ... specifies the value of the cell in the conditional format with the index 0, 1 2, ...
%C0, %C1, %C2, ... specifies the caption of the cell, or the string the cell displays in the conditional format with the index 0, 1 2, ...
%CD0, %CD1, %CD2, ... specifies the cell's user-date in the conditional format with the index 0, 1 2, ...
%CS0, %CS1, %CS2, ... specifies the cell's state in the conditional format with the index 0, 1 2, ...
The expression supports the following functions:
index, gets the index of the item
rindex, returns the recursive-index of the item
pos, returns the relative position of the item (the position within the parent's children collection)
rpos, returns the recursive relative-position of the item (the position within the parent's children collection)
opos, returns the relative old position of the item (the position within the parent's children collection)
ropos, returns the recursive relative-old-position of the item (the position within the parent's children collection)
apos, returns the absolute position of the item (the position from the first visible item)
rapos, returns the recursive absolute-position of the item (the position from the first visible item)
.
Type:
  • string
Example
"1" {string}, highlights all cells or items.
 "%0 >= 0" {string}, highlights the cells or items, when the cells in the first conditional format have the value greater or equal with zero
 "%0 startwith 'A'" {string}, highlights the cells or items, when the cells in the first column starts with A
expression

(static) key :string

The key field specifies the key associated with the format.
Type:
  • string
Example
"bold" {string}, specifies the key of the format.
key

(static) shape :any

The shape field defines the shape to apply on the cell / column The shape field can be any of the following:
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the column itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
.
Type:
  • any
Example
"" {string}, null {null}, no shape is applied
 "red" {string}, fills the object's background in red (CSS color)
 '{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
 "xxx" {string}, indicates that exontrol.Shapes.Tree.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace
shape