SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.error  property

The error which will be set if validations check about this column is failed when committing cell editing or row editing. 

You can check error level through errorLevel. The error and error level which have been set can be displayed in a special state when drawing the corresponding column cell of editing state. 

Defaults to null.

Getter
function error(): String
Setter
function setError(value: String)
Note
Code -1
    grid.onCurrentChanged = function (grid, newIndex) {
        // Display the error state of column which has the focus of editing row in other place.
        if (grid.isRowEditing()) {
            var col = newIndex.column;
            var level = col.errorLevel();
            $('#error').val(level != DataLudi.ValidationLevel.IGNORE ? col.error() : "");
        }
    };
See Also
errorLevel
validations
EditValidation
Cell Editing Overview
Examples
Cell Editing