X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/docs/source/Column.html diff --git a/docs/source/Column.html b/docs/source/Column.html index 4c2c4c43..0bab9bf1 100644 --- a/docs/source/Column.html +++ b/docs/source/Column.html @@ -1,5 +1,6 @@ + The source code @@ -12,28 +13,7 @@ *

While subclasses are provided to render data in different ways, this class renders a passed * data field unchanged and is usually used for textual columns.

*/ -Ext.grid.Column = function(config){ - Ext.apply(this, config); - - if(typeof this.renderer == 'string'){ - this.renderer = Ext.util.Format[this.renderer]; - } else if(Ext.isObject(this.renderer)){ - this.scope = this.renderer.scope; - this.renderer = this.renderer.fn; - } - 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 = { +Ext.grid.Column = Ext.extend(Object, {
/** * @cfg {Boolean} editable Optional. Defaults to true, enabling the configured * {@link #editor}. Set to false to initially disable editing on this column. @@ -117,8 +97,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. @@ -130,7 +110,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 @@ -227,8 +210,33 @@ 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, + + constructor : function(config){ + Ext.apply(this, config); + + if(Ext.isString(this.renderer)){ + this.renderer = Ext.util.Format[this.renderer]; + }else if(Ext.isObject(this.renderer)){ + this.scope = this.renderer.scope; + this.renderer = this.renderer.fn; + } + if(!this.scope){ + this.scope = this; + } + + var ed = this.editor; + delete this.editor; + this.setEditor(ed); + }, +
/** * Optional. A function which returns displayable data when passed the following parameters: *