fires before the edit stop command is received
values | object | an object with two parameters: the new value and the old one |
editor | object | the editor object |
ignoreUpdate | boolean | indicates whether the cell will be updated after editing |
boolean | returning false will prevent finishing of the edit operation |
grid.attachEvent("onBeforeEditStop", function(state, editor){ return false; });
grid.attachEvent("onEditorChange", function(id, value){
this.getItem(id.row)[id.column] = value;
this.refresh(id.row);
});
Events starting from "before" are blockable, which means that if they return false the action is blocked.
In the above sample editing is not finished when the edit stop command is received (it happens when you leave the editor body) and editing continues with setting the new value to the item and refreshing it. It is done to display the new value outside the field where editor opens.
The value of the ignoreUpdate parameter depends on the way of editor closing. When the editor closes with the editStop method, the record is updated, while the editCancel method doesn't save changes before closing the editor.