Formats the value for display. This method may be used internally by the grid control to produce the cell text from the cell value property.
nullvar text = format.valueToText(value);
value (string/number/date) - cell value
text string formatted for display
// create and configure date converter
var date = new AW.Formats.Date;
date.setTextFormat("mmm d, yyyy");
var value = 1084834800000; // May 18, 2004
var text = date.valueToText(value);
Derived classes (AW.Formats.Number, AW.Formats.Date) overwrite dataToText()
and valueToText()
methods according to the pattern specified in the setTextFormat()
call.
If the data cannot be parsed - the method returns error text which can be configured with setErrorText()
call.
AW.System.Format methods: dataToText, valueToData, setErrorText
Formatting classes: number, string, html, date
Grid cell properties: text, value, data, format