X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/docs/source/ColumnModel.html?ds=inline diff --git a/docs/source/ColumnModel.html b/docs/source/ColumnModel.html index ad5edcf6..823984ac 100644 --- a/docs/source/ColumnModel.html +++ b/docs/source/ColumnModel.html @@ -202,10 +202,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { if(!initial){ // cleanup delete this.totalWidth; for(i = 0, len = this.config.length; i < len; i++){ - c = this.config[i]; - if(c.editor){ - c.editor.destroy(); - } + this.config[i].destroy(); } } @@ -221,7 +218,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { for(i = 0, len = config.length; i < len; i++){ c = Ext.applyIf(config[i], this.defaults); // if no id, create one using column's ordinal position - if(typeof c.id == 'undefined'){ + if(Ext.isEmpty(c.id)){ c.id = i; } if(!c.isColumn){ @@ -510,7 +507,11 @@ var grid = new Ext.grid.GridPanel({ * @return {Boolean} */ isCellEditable : function(colIndex, rowIndex){ - return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false; + var c = this.config[colIndex], + ed = c.editable; + + //force boolean + return !!(ed || (!Ext.isDefined(ed) && c.editor)); },
/** @@ -583,16 +584,15 @@ myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first colu * @param {Object} editor The editor object */ setEditor : function(col, editor){ - Ext.destroy(this.config[col].editor); - this.config[col].editor = editor; + this.config[col].setEditor(editor); }, /** * Destroys this column model by purging any event listeners, and removing any editors. */ destroy : function(){ - for(var i = 0, c = this.config, len = c.length; i < len; i++){ - Ext.destroy(c[i].editor); + for(var i = 0, len = this.config.length; i < len; i++){ + this.config[i].destroy(); } this.purgeListeners(); }