:: Documentation >>

setErrorValue

Allows to set custom error value which is returned by the dataToValue() and textToValue() methods in case of parsing error.

The sort order of the grid rows depends of the cell value - the custom error value will push the rows with the error to the top or to the bottom.

null

Syntax

format.setErrorValue(value);

Parameters

value (string/number/date) - error value

Examples

// datasource
var myData = [
    ["Date1", "2004-05-18T00:00:00+01:00"],
    ["Date2", "---abc---"]
];

// date converter
var date = new AW.Formats.Date;
date.setDataFormat("ISO8601");
date.setTextFormat("mmm-dd-yyyy");
date.setErrorText("invalid date!"); 
date.setErrorValue(0); // custom error value

// grid control
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setCellFormat(date, 1)
obj.setColumnCount(2);
obj.setRowCount(2);
document.write(obj);

See also

AW.System.Format methods: dataToValue, textToValue, setErrorText
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