Class type Ext_grid_plugin_Editing.events


class type events = object .. end
Inherits
method beforeedit : 'a 'b.
(t Js.t -> 'a Js.t -> 'b Js.t -> unit) Js.callback
Js.writeonly_prop

Fires before editing is triggered. Return false from event handler to stop the editing.

Parameters:


method canceledit : 'c 'd.
(t Js.t -> 'c Js.t -> 'd Js.t -> unit) Js.callback
Js.writeonly_prop

Fires when the user started editing but then cancelled the edit.

Parameters:


method edit : 'e 'f.
(t Js.t -> 'e Js.t -> 'f Js.t -> unit) Js.callback
Js.writeonly_prop

Fires after a editing. Usage example:

grid.on('edit', function(editor, e) {
    // commit the changes right after editing finished
    e.record.commit();
});

Parameters:


method validateedit : 'g 'h.
(t Js.t -> 'g Js.t -> 'h Js.t -> unit) Js.callback
Js.writeonly_prop

Fires after editing, but before the value is set in the record. Return false from event handler to cancel the change.

Usage example showing how to remove the red triangle (dirty record indicator) from some records (not all). By observing the grid's validateedit event, it can be cancelled if the edit occurs on a targeted row (for example) and then setting the field's new value in the Record directly:

grid.on('validateedit', function(editor, e) {
  var myTargetRow = 6;

  if (e.rowIdx == myTargetRow) {
    e.cancel = true;
    e.record.data[e.field] = e.value;
  }
});

Parameters: