Sencha Documentation

Sort by

Defined By

Config Options

 
True to automatically HTML encode and decode values pre and post edit (defaults to false)
True to automatically HTML encode and decode values pre and post edit (defaults to false)
 
The number of clicks on a cell required to display the cell's editor (defaults to 2). Setting this option to 'auto' m...

The number of clicks on a cell required to display the cell's editor (defaults to 2).

Setting this option to 'auto' means that mousedown on the selected cell starts editing that cell.

 
True to force validation even if the value is unmodified (defaults to false)
True to force validation even if the value is unmodified (defaults to false)
Defined By

Methods

 
User overrideable to provide custom editing available logic.
User overrideable to provide custom editing available logic.

Returns

  • Void
 
startEditing( Number rowIndex, Number colIndex) : Void
Starts editing the specified for the specified row/column
Starts editing the specified for the specified row/column

Parameters

  • rowIndex : Number
  • colIndex : Number

Returns

  • Void
 
Stops any active editing
Stops any active editing

Parameters

  • cancel : Boolean
    (optional) True to cancel any changes

Returns

  • Void
Defined By

Events

 
Fires after a cell is edited. The edit event object has the following properties <br /> <ul style="padding:5px;paddin...
Fires after a cell is edited. The edit event object has the following properties
  • grid - This grid
  • record - The record being edited
  • field - The field name being edited
  • value - The value being set
  • originalValue - The original value for the field, before the edit.
  • row - The grid row index
  • column - The grid column index
grid.on('afteredit', afterEdit, this );

function afterEdit(e) {
    // execute an XHR to send/commit data to the server, in callback do (if successful):
    e.record.commit();
};

Parameters

  • e : Object
    An edit event (see above for description)
 
Fires before cell editing is triggered. The edit event object has the following properties <br /> <ul style="padding:...
Fires before cell editing is triggered. The edit event object has the following properties
  • grid - This grid
  • record - The record being edited
  • field - The field name being edited
  • value - The value for the field being edited.
  • row - The grid row index
  • column - The grid column index
  • cancel - Set this to true to cancel the edit or return false from your handler.

Parameters

  • e : Object
    An edit event (see above for description)
 
Fires after a cell is edited, but before the value is set in the record. Return false to cancel the change. The edit ...
Fires after a cell is edited, but before the value is set in the record. Return false to cancel the change. The edit event object has the following properties
  • grid - This grid
  • record - The record being edited
  • field - The field name being edited
  • value - The value being set
  • originalValue - The original value for the field, before the edit.
  • row - The grid row index
  • column - The grid column index
  • cancel - Set this to true to cancel the edit or return false from your handler.
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(e) {
  var myTargetRow = 6;

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

Parameters

  • e : Object
    An edit event (see above for description)