colFormat

Table Properties for general information about the Table component.

Specifies the Table column data format as an array. The attribute can be referenced using the column header or number. Column and row indices start at 0.

Type

Array

Array of formats. See Add Data Format for information on how to specify formats.

StyleConstant.DATE_FORMAT

date display

StyleConstant.DECIMAL_FORMAT

number display

StyleConstant.MESSAGE_FORMAT

text display

StyleConstant.PERCENT_FORMAT

fraction display

StyleConstant.CURRENCY_FORMAT

locale-adapting currency display

Example

colFormat[5] = [StyleConstant.DATE_FORMAT, "yy-MMMM-dd"];
colFormat['Total'] = [StyleConstant.DECIMAL_FORMAT, "#,###.00"];

Either syntax below can be used in component script:

colFormat                 // unqualified
TableView1.colFormat      // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.