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.
nullformat.setErrorValue(value);
value (string/number/date) - error value
// 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);
AW.System.Format methods: dataToValue, textToValue, setErrorText
Formatting classes: number, string, html, date
Grid cell properties: text, value, data, format