SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onValidateRow  event

It will be fired when Commit row editing. 

If throw an exception by calling throwValidationError within this event handler, editing committing will be discontinued, and an error message will be displayed according to the settings. 

Before this event, onValidateCell event will be fired in each cell. 

function onValidateRow (grid: GridBase, row: GridRow, inserting: Boolean, values: Object);
Returns
Void
Parameters
grid - GridBase.
row - GridRow.
Editing row.
inserting - Boolean.
If it is adding row, it will be true.
values - Object.
JSON object in which contains cell values of editing row.
Code -1
    grid.onValidateRow = function (grid, row, inserting, values) {
        DataLudi.throwValidationError(DataLudi.ValidationLevel.ERROR, 'message');
    });
See Also
onValidateCell
throwValidationError
ValidationLevel
DataColumn.validations
EditValidation
Examples
Cell Editing
Edit Events
Edit Keys
Row Updating
Row Inserting
Row Deleting