Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / docs / source / Column.html
index 4c2c4c4..c72ff65 100644 (file)
@@ -1,11 +1,17 @@
-<html>\r
-<head>\r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext.grid.Column"></div>/**\r
+<html>
+<head>
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.grid.Column"></div>/**\r
  * @class Ext.grid.Column\r
  * <p>This class encapsulates column configuration data to be used in the initialization of a\r
  * {@link Ext.grid.ColumnModel ColumnModel}.</p>\r
@@ -15,7 +21,7 @@
 Ext.grid.Column = function(config){\r
     Ext.apply(this, config);\r
 \r
-    if(typeof this.renderer == 'string'){\r
+    if(Ext.isString(this.renderer)){\r
         this.renderer = Ext.util.Format[this.renderer];\r
     } else if(Ext.isObject(this.renderer)){\r
         this.scope = this.renderer.scope;\r
@@ -23,16 +29,11 @@ Ext.grid.Column = function(config){
     }\r
     this.renderer = this.renderer.createDelegate(this.scope || config);\r
 \r
-    if(this.id === undefined){\r
-        this.id = ++Ext.grid.Column.AUTO_ID;\r
-    }\r
     if(this.editor){\r
         this.editor = Ext.create(this.editor, 'textfield');\r
     }\r
 };\r
 \r
-Ext.grid.Column.AUTO_ID = 0;\r
-\r
 Ext.grid.Column.prototype = {\r
     <div id="cfg-Ext.grid.Column-editable"></div>/**\r
      * @cfg {Boolean} editable Optional. Defaults to <tt>true</tt>, enabling the configured\r
@@ -117,8 +118,8 @@ Ext.grid.Column.prototype = {
      */\r
     <div id="cfg-Ext.grid.Column-sortable"></div>/**\r
      * @cfg {Boolean} sortable Optional. <tt>true</tt> if sorting is to be allowed on this column.\r
-     * Defaults to the value of the {@link #defaultSortable} property.\r
-     * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}.\r
+     * Defaults to the value of the <code>{@link Ext.grid.ColumnModel#defaultSortable}</code> property.\r
+     * Whether local/remote sorting is used is specified in <code>{@link Ext.data.Store#remoteSort}</code>.\r
      */\r
     <div id="cfg-Ext.grid.Column-fixed"></div>/**\r
      * @cfg {Boolean} fixed Optional. <tt>true</tt> if the column width cannot be changed.  Defaults to <tt>false</tt>.\r
@@ -130,7 +131,10 @@ Ext.grid.Column.prototype = {
      * @cfg {Boolean} menuDisabled Optional. <tt>true</tt> to disable the column menu. Defaults to <tt>false</tt>.\r
      */\r
     <div id="cfg-Ext.grid.Column-hidden"></div>/**\r
-     * @cfg {Boolean} hidden Optional. <tt>true</tt> to hide the column. Defaults to <tt>false</tt>.\r
+     * @cfg {Boolean} hidden\r
+     * Optional. <tt>true</tt> to initially hide this column. Defaults to <tt>false</tt>.\r
+     * A hidden column {@link Ext.grid.GridPanel#enableColumnHide may be shown via the header row menu}.\r
+     * If a column is never to be shown, simply do not include this column in the Column Model at all. \r
      */\r
     <div id="cfg-Ext.grid.Column-tooltip"></div>/**\r
      * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip.  If Quicktips\r
@@ -227,8 +231,15 @@ var grid = new Ext.grid.GridPanel({
      * if editing is supported by the grid. See <tt>{@link #editable}</tt> also.\r
      */\r
 \r
-    // private. Used by ColumnModel to avoid reprocessing\r
+    /**\r
+     * @private\r
+     * @cfg {Boolean} isColumn\r
+     * Used by ColumnModel setConfig method to avoid reprocessing a Column\r
+     * if <code>isColumn</code> is not set ColumnModel will recreate a new Ext.grid.Column\r
+     * Defaults to true.\r
+     */\r
     isColumn : true,\r
+\r
     <div id="prop-Ext.grid.Column-renderer"></div>/**\r
      * Optional. A function which returns displayable data when passed the following parameters:\r
      * <div class="mdetail-params"><ul>\r
@@ -248,7 +259,7 @@ var grid = new Ext.grid.GridPanel({
      * @type Function\r
      */\r
     renderer : function(value){\r
-        if(typeof value == 'string' && value.length < 1){\r
+        if(Ext.isString(value) && value.length < 1){\r
             return '&#160;';\r
         }\r
         return value;\r
@@ -284,8 +295,8 @@ var grid = new Ext.grid.GridPanel({
 <div id="cls-Ext.grid.BooleanColumn"></div>/**\r
  * @class Ext.grid.BooleanColumn\r
  * @extends Ext.grid.Column\r
- * <p>A Column definition class which renders boolean data fields.  See the {@link Ext.grid.ColumnModel#xtype xtype}\r
- * config option of {@link Ext.grid.ColumnModel} for more details.</p>\r
+ * <p>A Column definition class which renders boolean data fields.  See the {@link Ext.grid.Column#xtype xtype}\r
+ * config option of {@link Ext.grid.Column} for more details.</p>\r
  */\r
 Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {\r
     <div id="cfg-Ext.grid.BooleanColumn-trueText"></div>/**\r
@@ -324,7 +335,7 @@ Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {
  * @class Ext.grid.NumberColumn\r
  * @extends Ext.grid.Column\r
  * <p>A Column definition class which renders a numeric data field according to a {@link #format} string.  See the\r
- * {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more details.</p>\r
+ * {@link Ext.grid.Column#xtype xtype} config option of {@link Ext.grid.Column} for more details.</p>\r
  */\r
 Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {\r
     <div id="cfg-Ext.grid.NumberColumn-format"></div>/**\r
@@ -343,7 +354,7 @@ Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {
  * @class Ext.grid.DateColumn\r
  * @extends Ext.grid.Column\r
  * <p>A Column definition class which renders a passed date according to the default locale, or a configured\r
- * {@link #format}. See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel}\r
+ * {@link #format}. See the {@link Ext.grid.Column#xtype xtype} config option of {@link Ext.grid.Column}\r
  * for more details.</p>\r
  */\r
 Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {\r
@@ -364,7 +375,7 @@ Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {
  * @extends Ext.grid.Column\r
  * <p>A Column definition class which renders a value by processing a {@link Ext.data.Record Record}'s\r
  * {@link Ext.data.Record#data data} using a {@link #tpl configured} {@link Ext.XTemplate XTemplate}.\r
- * See the {@link Ext.grid.ColumnModel#xtype xtype} config option of {@link Ext.grid.ColumnModel} for more\r
+ * See the {@link Ext.grid.Column#xtype xtype} config option of {@link Ext.grid.Column} for more\r
  * details.</p>\r
  */\r
 Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {\r
@@ -375,7 +386,7 @@ Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {
      */\r
     constructor: function(cfg){\r
         Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg);\r
-        var tpl = typeof Ext.isObject(this.tpl) ? this.tpl : new Ext.XTemplate(this.tpl);\r
+        var tpl = Ext.isObject(this.tpl) ? this.tpl : new Ext.XTemplate(this.tpl);\r
         this.renderer = function(value, p, r){\r
             return tpl.apply(r.data);\r
         };\r
@@ -404,6 +415,6 @@ Ext.grid.Column.types = {
     numbercolumn: Ext.grid.NumberColumn,\r
     datecolumn: Ext.grid.DateColumn,\r
     templatecolumn: Ext.grid.TemplateColumn\r
-};</pre>    \r
-</body>\r
+};</pre>
+</body>
 </html>
\ No newline at end of file