onBeforeEditStop

fires before the edit stop command is received

boolean onBeforeEditStop(object values,object editor,boolean ignoreUpdate);
valuesobjectan object with two parameters: the new value and the old one
editorobjectthe editor object
ignoreUpdatebooleanindicates whether the cell will be updated after editing
booleanreturning false will prevent finishing of the edit operation

Example

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);
});

Related samples

Details

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.

See also
Back to top