:: Documentation >>

setTextFormat

Configures number formatting. Allows to specify number of decimals, decimal point and thousands separators with the single format pattern.

null

Syntax

number.setTextFormat(pattern);

Parameters

pattern (string) - text format

Examples

var number = new AW.Formats.Number;
number.setTextFormat("USD #,###.##");

Remarks

setTextFormat() method requires the decimal separator in the formatting pattern so if you need zero decimals - use #. or #,###. (dot at the end).

See also

setCellFormat method

Comments

Aligning text Bernie (1)
currency format not working Jonathan Doklovic (8)
Formats applied to empty cells ANYWAY? Diabolik (5)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5