:: Home >>

textToValue

Parses the input text. This method may be used internally by the grid control to produce the cell value from the cell text property (after the cell text is modified).

In configurations where the display text is assigned directly to the cell text property, the cell value (obtained from textToValue() call) is uses to sort the grid rows.

Syntax

var value = format.textToValue(text);

Parameters

text (string) - input text

Returns

parsed value

Examples

// create and configure date converter
var date = new AW.Formats.Date;
date.setTextFormat("mmm d, yyyy");

var text = "May 18, 2004";
var value = date.textToValue(text);

Remarks

If the input text cannot be parsed successfully the method returns the error value which can be configured with setErrorValue() call.

See also

AW.System.Format methods: textToData, valueToData, setErrorValue
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.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