SMART datagrid v.1 > Classes > DataColumn
The array of EditValidation objects which validate if the editing contents are appropriate when committing editing of data cell involved in this column.
When specifying as Setter, you can specify either EditValidation or setting object rather than array.
Defaults to null.
grid.columnByName('colPrice').setValidations([{
expression: 'value > 1000',
level: DataLudi.ValidationLevel.ERROR,
message: 'The unit price should be greater than 1000.'
}, {
callback: function (scope) {
if (scope.value > 2000) {
return false;
}
},
level: DataLudi.ValidationLevel.INFO,
message: 'The unit price should be less than 2000.'
}]);
// You can specify only one.
grid.columnByName('colQuantity').setValidations({
expression: 'value > 100',
level: DataLudi.ValidationLevel.ERROR,
message: 'The quantity should be greater than 100.'
});