Numeric formats converter class. Parses the numeric values and applies display formatting rules.
var obj = new AW.Formats.Number;
clone | Creates an object clone. |
comparator | Returns comparator function. |
dataToText | Transforms the external data to the readable text. |
dataToValue | Transforms the external data to the native value type. |
init | Initializes the object. |
setErrorText | Sets the error text. |
setErrorValue | Sets the error value. |
setTextFormat | Sets the formatting pattern for the text. |
setTimeout | Calls the function after the specified delay. |
textToData | Transforms the text to the external data format. |
textToValue | Transforms the text to the native value type. |
toString | Converts object to string. |
valueToData | Transforms the value to the external data format. |
valueToText | Transforms the value to the readable text. |
var myData = [
["Number formats", "12345.6789"],
];
var number = new AW.Formats.Number;
number.setTextFormat("USD #,###.##"); // configure formatting
// grid control
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setCellFormat(number, 1); // numbers in the second column
obj.setColumnCount(2);
obj.setRowCount(1);
document.write(obj);
Formats/conversions overview, AW.System.Format (base class), setTextFormat method, setCellFormat method