:: Documentation >>

dataToValue

Parses the data coming from the datasource. This method is used internally by the grid control to produce the cell value from the cell data property. The cell value property is used to compare cells for the sorting/filtering of the grid rows.

null

Syntax

var value = format.dataToValue(data);

Parameters

data (string) - incoming data string (from the datasource)

Returns

parsed value

Examples

// create and configure date converter
var date = new AW.Formats.Date;
date.setDataFormat("ISO8601");

var data = "2004-05-18T00:00:00+01:00";
var value = date.dataToValue(data); // 1084834800000 (May 18, 2004)

Remarks

Derived classes (AW.Formats.Date) overwrite dataToValue() method according to the pattern specified in the setDataFormat() call.

If the data cannot be parsed - the method returns error value which can be configured with setErrorValue() call.

See also

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

Comments

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