:: Home >>

setTextFormat

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

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

12 Oct 07
Aligning text Bernie (1)
11 Nov 06
currency format not working Jonathan Doklovic (8)
10 Mar 06
Formats applied to empty cells ANYWAY? Diabolik (5)

Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.5.0 - 2.5.5
2.5.5
2.5.0 - 2.5.4
2.5.4
2.5.0 - 2.5.3
2.5.3
2.5.0 - 2.5.2
2.5.2
2.5, 2.5.1
2.5.1