X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/src/widgets/grid/Column.js diff --git a/src/widgets/grid/Column.js b/src/widgets/grid/Column.js index 5c2d4571..12d1bc5c 100644 --- a/src/widgets/grid/Column.js +++ b/src/widgets/grid/Column.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.0.0 + * Ext JS Library 3.0.3 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license @@ -14,7 +14,7 @@ Ext.grid.Column = function(config){ Ext.apply(this, config); - if(typeof this.renderer == 'string'){ + if(Ext.isString(this.renderer)){ this.renderer = Ext.util.Format[this.renderer]; } else if(Ext.isObject(this.renderer)){ this.scope = this.renderer.scope; @@ -22,16 +22,11 @@ Ext.grid.Column = function(config){ } this.renderer = this.renderer.createDelegate(this.scope || config); - if(this.id === undefined){ - this.id = ++Ext.grid.Column.AUTO_ID; - } if(this.editor){ this.editor = Ext.create(this.editor, 'textfield'); } }; -Ext.grid.Column.AUTO_ID = 0; - Ext.grid.Column.prototype = { /** * @cfg {Boolean} editable Optional. Defaults to true, enabling the configured @@ -116,8 +111,8 @@ Ext.grid.Column.prototype = { */ /** * @cfg {Boolean} sortable Optional. true if sorting is to be allowed on this column. - * Defaults to the value of the {@link #defaultSortable} property. - * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}. + * Defaults to the value of the {@link Ext.grid.ColumnModel#defaultSortable} property. + * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}. */ /** * @cfg {Boolean} fixed Optional. true if the column width cannot be changed. Defaults to false. @@ -129,7 +124,10 @@ Ext.grid.Column.prototype = { * @cfg {Boolean} menuDisabled Optional. true to disable the column menu. Defaults to false. */ /** - * @cfg {Boolean} hidden Optional. true to hide the column. Defaults to false. + * @cfg {Boolean} hidden + * Optional. true to initially hide this column. Defaults to false. + * A hidden column {@link Ext.grid.GridPanel#enableColumnHide may be shown via the header row menu}. + * If a column is never to be shown, simply do not include this column in the Column Model at all. */ /** * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip. If Quicktips @@ -226,8 +224,15 @@ var grid = new Ext.grid.GridPanel({ * if editing is supported by the grid. See {@link #editable} also. */ - // private. Used by ColumnModel to avoid reprocessing + /** + * @private + * @cfg {Boolean} isColumn + * Used by ColumnModel setConfig method to avoid reprocessing a Column + * if isColumn is not set ColumnModel will recreate a new Ext.grid.Column + * Defaults to true. + */ isColumn : true, + /** * Optional. A function which returns displayable data when passed the following parameters: *