/**
* @cfg {Boolean} forceValidation
* True to force validation even if the value is unmodified (defaults to false)
/**
* @cfg {Boolean} forceValidation
* True to force validation even if the value is unmodified (defaults to false)
- /**
- * @cfg {Boolean} autoEncode
- * True to automatically HTML encode and decode values pre and post edit (defaults to false)
- */
- autoEncode : false,
+ /**
+ * @cfg {Boolean} autoEncode
+ * True to automatically HTML encode and decode values pre and post edit (defaults to false)
+ */
+ autoEncode : false,
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();
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();
* 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:
* 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:
onResize : function(){
Ext.grid.EditorGridPanel.superclass.onResize.apply(this, arguments);
var ae = this.activeEditor;
onResize : function(){
Ext.grid.EditorGridPanel.superclass.onResize.apply(this, arguments);
var ae = this.activeEditor;
field = this.colModel.getDataIndex(ed.col);
value = this.postEditValue(value, startValue, r, field);
if(this.forceValidation === true || String(value) !== String(startValue)){
field = this.colModel.getDataIndex(ed.col);
value = this.postEditValue(value, startValue, r, field);
if(this.forceValidation === true || String(value) !== String(startValue)){
var v = this.preEditValue(r, field);
ed.startEdit(this.view.getCell(row, col).firstChild, Ext.isDefined(v) ? v : '');
var v = this.preEditValue(r, field);
ed.startEdit(this.view.getCell(row, col).firstChild, Ext.isDefined(v) ? v : '');
- postEditValue : function(value, originalValue, r, field){
- return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlEncode(value) : value;
- },
+ postEditValue : function(value, originalValue, r, field){
+ return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlEncode(value) : value;
+ },
if(ae){
ae[cancel === true ? 'cancelEdit' : 'completeEdit']();
this.view.focusCell(ae.row, ae.col);
if(ae){
ae[cancel === true ? 'cancelEdit' : 'completeEdit']();
this.view.focusCell(ae.row, ae.col);