:: Home >>

valueToText

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.

Syntax

var text = format.valueToText(value);

Parameters

value (string/number/date) - cell value

Returns

text string formatted for display

Examples

// 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);

Remarks

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.

See also

AW.System.Format methods: dataToText, valueToData, setErrorText
Formatting classes: number, string, html, date
Grid cell properties: text, value, data, format

Comments

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

Documentation:

Recent changes:

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
2.5
Release History
2.5
2.0.2