:: Documentation >>

setErrorText

Allows to set custom error text which is returned by dataToText()method in case of parsing error.

null

Syntax

format.setErrorText(text);

Parameters

text (string) - error text

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!"); // custom error text

// 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: dataToText, 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