SMART datagrid v.1 > Classes > EditOptions
EditValidationCollection object which is the group of row unit EditValidation.
The validations which have been set will be run when GridBase.commit the row. You can set cell unit validation in each DataColumn.
Defaults to null.
column.setValidations([{
criteria: "value > 1000",
message: "The default price should be greater than 1000!",
mode: "always",
level: "warning"
}, {
criteria: "value < 20000",
message: "The default price should be less than 20000!",
mode: "always",
level: "error"
}]);
In most cases, when creating grid, it will be contained in column setting.
grid.setColumns([{
name: 'colPrice',
fieldName: 'price',
validations: [{
criteria: "value > 1000",
message: "The default price should be greater than 1000!",
mode: "always",
level: "warning"
},
...
],
...
}];