X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/RowEditing.html diff --git a/docs/source/RowEditing.html b/docs/source/RowEditing.html index bdcf25d2..ab3b2dbd 100644 --- a/docs/source/RowEditing.html +++ b/docs/source/RowEditing.html @@ -1,4 +1,21 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @class Ext.grid.plugin.RowEditing
  * @extends Ext.grid.plugin.Editing
  * 
@@ -71,7 +88,7 @@ Ext.define('Ext.grid.plugin.RowEditing', {
 
     editStyle: 'row',
 
-    /**
+    /**
      * @cfg {Boolean} autoCancel
      * `true` to automatically cancel any pending changes when the row editor begins editing a new row.
      * `false` to force the user to explicitly cancel the pending changes. Defaults to `true`.
@@ -79,14 +96,14 @@ Ext.define('Ext.grid.plugin.RowEditing', {
      */
     autoCancel: true,
 
-    /**
+    /**
      * @cfg {Number} clicksToMoveEditor
      * The number of clicks to move the row editor to a new row while it is visible and actively editing another row.
      * This will default to the same value as {@link Ext.grid.plugin.Editing#clicksToEdit clicksToEdit}.
      * @markdown
      */
 
-    /**
+    /**
      * @cfg {Boolean} errorSummary
      * `true` to show a {@link Ext.tip.ToolTip tooltip} that summarizes all validation errors present
      * in the row editor. Set to `false` to prevent the tooltip from showing. Defaults to `true`.
@@ -94,7 +111,7 @@ Ext.define('Ext.grid.plugin.RowEditing', {
      */
     errorSummary: true,
 
-    /**
+    /**
      * @event beforeedit
      * Fires before row editing is triggered. The edit event object has the following properties <br />
      * <ul style="padding:5px;padding-left:16px;">
@@ -111,7 +128,7 @@ Ext.define('Ext.grid.plugin.RowEditing', {
      * @param {Ext.grid.plugin.Editing} editor
      * @param {Object} e An edit event (see above for description)
      */
-    /**
+    /**
      * @event edit
      * Fires after a row is edited. The edit event object has the following properties <br />
      * <ul style="padding:5px;padding-left:16px;">
@@ -136,7 +153,7 @@ function onEdit(e) {
      * @param {Ext.grid.plugin.Editing} editor
      * @param {Object} e An edit event (see above for description)
      */
-    /**
+    /**
      * @event validateedit
      * 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 <br />
@@ -180,7 +197,7 @@ grid.on('validateedit', function(e) {
         me.autoCancel = !!me.autoCancel;
     },
 
-    /**
+    /**
      * @private
      * AbstractComponent calls destroy on all its plugins at destroy time.
      */
@@ -190,7 +207,7 @@ grid.on('validateedit', function(e) {
         me.callParent(arguments);
     },
 
-    /**
+    /**
      * Start editing the specified record, using the specified Column definition to define which field is being edited.
      * @param {Model} record The Store data record which backs the row to be edited.
      * @param {Model} columnHeader The Column object defining the column to be edited.
@@ -309,38 +326,47 @@ grid.on('validateedit', function(e) {
 
     // private
     onColumnAdd: function(ct, column) {
-        var me = this,
+        if (column.isHeader) {
+            var me = this,
+                editor;
+            
+            me.initFieldAccessors(column);
             editor = me.getEditor();
-
-        me.initFieldAccessors(column);
-        if (editor && editor.onColumnAdd) {
-            editor.onColumnAdd(column);
+            
+            if (editor && editor.onColumnAdd) {
+                editor.onColumnAdd(column);
+            }
         }
     },
 
     // private
     onColumnRemove: function(ct, column) {
-        var me = this,
-            editor = me.getEditor();
-
-        if (editor && editor.onColumnRemove) {
-            editor.onColumnRemove(column);
+        if (column.isHeader) {
+            var me = this,
+                editor = me.getEditor();
+    
+            if (editor && editor.onColumnRemove) {
+                editor.onColumnRemove(column);
+            }
+            me.removeFieldAccessors(column);  
         }
-        me.removeFieldAccessors(column);
     },
 
     // private
     onColumnResize: function(ct, column, width) {
-        var me = this,
-            editor = me.getEditor();
-
-        if (editor && editor.onColumnResize) {
-            editor.onColumnResize(column, width);
+        if (column.isHeader) {
+            var me = this,
+                editor = me.getEditor();
+    
+            if (editor && editor.onColumnResize) {
+                editor.onColumnResize(column, width);
+            }
         }
     },
 
     // private
     onColumnHide: function(ct, column) {
+        // no isHeader check here since its already a columnhide event.
         var me = this,
             editor = me.getEditor();
 
@@ -351,6 +377,7 @@ grid.on('validateedit', function(e) {
 
     // private
     onColumnShow: function(ct, column) {
+        // no isHeader check here since its already a columnshow event.
         var me = this,
             editor = me.getEditor();
 
@@ -361,6 +388,7 @@ grid.on('validateedit', function(e) {
 
     // private
     onColumnMove: function(ct, column, fromIdx, toIdx) {
+        // no isHeader check here since its already a columnmove event.
         var me = this,
             editor = me.getEditor();
 
@@ -375,4 +403,6 @@ grid.on('validateedit', function(e) {
         me.callParent(arguments);
         me.getEditor().setField(column.field, column);
     }
-});
\ No newline at end of file +});
+ +