SMART datagrid v.1 > Classes > EditOptions
If specify as true, when Row Updating in grid, if call the function which changes DataSet, it will automatically commit grid row editing first.
When updating or appending grid rows, if call the function which changes DataSet in event handler, it will throw "Client is editing" exception. In order to avoid this exception, row editing should be committed first. If set this property as true, the grid will automatically commit.
When change the cell value of the same row during row editing, you should call GridBase.setValueAt instead of GridDataSet.setValue.
Defaults to false.
grid.setOptions({
edit: {
autoCommit: true
}
...
});
grid.setEditOptions({
autoCommit: true
});
grid.editOptions().setAutoCommit(true);
grid.onEditCellUpdated = function (grid, row, fieldIndex, newValue, oldValue) {
// If it is autoCommit, it will commit grid editing first before this call.
dataset.updateRow(9, { 'salary': dsMain.getValue(9, 0) + 1 });
};