Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / output / Ext.grid.ColumnModel.html
index 87d7099..9e011b7 100644 (file)
@@ -1,4 +1,4 @@
-<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.grid.ColumnModel-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.grid.ColumnModel-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.grid.ColumnModel-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.grid.ColumnModel-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.grid.ColumnModel"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif">ColumnModel</pre></div><h1>Class <a href="source/ColumnModel.html#cls-Ext.grid.ColumnModel">Ext.grid.ColumnModel</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.grid</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">ColumnModel.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/ColumnModel.html#cls-Ext.grid.ColumnModel">ColumnModel</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.grid.PropertyColumnModel.html" ext:cls="Ext.grid.PropertyColumnModel">PropertyColumnModel</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.util.Observable.html" ext:cls="Ext.util.Observable" ext:member="">Observable</a></td></tr><tr><td class="hd-info"></td></tr></table><div class="description"><p>After the data has been read into the client side cache (<b><a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Store</a></b>),
+<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif">ColumnModel</pre></div><h1>Class <a href="source/ColumnModel.html#cls-Ext.grid.ColumnModel">Ext.grid.ColumnModel</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.grid</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">ColumnModel.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/ColumnModel.html#cls-Ext.grid.ColumnModel">ColumnModel</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.grid.PropertyColumnModel.html" ext:cls="Ext.grid.PropertyColumnModel">PropertyColumnModel</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.util.Observable.html" ext:cls="Ext.util.Observable" ext:member="">Observable</a></td></tr></table><div class="description"><p>After the data has been read into the client side cache (<b><a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Store</a></b>),
 the ColumnModel is used to configure how and what parts of that data will be displayed in the
 vertical slices (columns) of the grid. The Ext.grid.ColumnModel Class is the default implementation
 of a ColumnModel used by implentations of <a href="output/Ext.grid.GridPanel.html" ext:cls="Ext.grid.GridPanel">GridPanel</a>.</p>
@@ -195,7 +195,7 @@ Or a shorthand syntax:<br>
  scope: this
 });</code></pre></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addListener" ext:member="#addListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.grid.ColumnModel-destroy"></a><b><a href="source/ColumnModel.html#method-Ext.grid.ColumnModel-destroy">destroy</a></b>()\r
     :\r
-                                        void<div class="mdesc"><div class="short">Destroys this column model by purging any event listeners, and removing any editors.</div><div class="long">Destroys this column model by purging any event listeners, and removing any editors.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ColumnModel</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>Object&nbsp;events</code>&nbsp;)\r
+                                        void<div class="mdesc"><div class="short">Destroys this column model by purging any event listeners, and removing any editors.</div><div class="long">Destroys this column model by purging any event listeners, and removing any editors.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">ColumnModel</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>String/Array&nbsp;events</code>&nbsp;)\r
     :\r
                                         void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling&#13;\r
 this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling\r
@@ -204,13 +204,13 @@ this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fi
 implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\r
 access the required target more quickly.</p>\r
 <p>Example:</p><pre><code>Ext.override(Ext.form.Field, {\r
-<i>//  Add functionality to Field<em>'s initComponent to enable the change event to bubble\r</i>
-    initComponent: Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {\r
-        this.enableBubble('</em>change<em>');\r
+    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble\r</i>
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {\r
+        this.enableBubble(<em>'change'</em>);\r
     }),\r
 \r
-<i>//  We know that we want Field'</em>s events to bubble directly to the FormPanel.\r</i>
-    getBubbleTarget: <b>function</b>() {\r
+    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.\r</i>
+    getBubbleTarget : <b>function</b>() {\r
         <b>if</b> (!this.formPanel) {\r
             this.formPanel = this.findParentByType(<em>'form'</em>);\r
         }\r
@@ -225,11 +225,11 @@ access the required target more quickly.</p>
     }],\r
     listeners: {\r
         change: <b>function</b>() {\r
-<i>//          Title goes red <b>if</b> form has been modified.\r</i>
-            myForm.header.setStyle(<em>"color"</em>, <em>"red"</em>);\r
+            <i>// Title goes red <b>if</b> form has been modified.\r</i>
+            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);\r
         }\r
     }\r
-});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : Object<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.grid.ColumnModel-findColumnIndex"></a><b><a href="source/ColumnModel.html#method-Ext.grid.ColumnModel-findColumnIndex">findColumnIndex</a></b>(&nbsp;<code>String&nbsp;col</code>&nbsp;)\r
+});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : String/Array<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.grid.ColumnModel-findColumnIndex"></a><b><a href="source/ColumnModel.html#method-Ext.grid.ColumnModel-findColumnIndex">findColumnIndex</a></b>(&nbsp;<code>String&nbsp;col</code>&nbsp;)\r
     :\r
                                         Number<div class="mdesc"><div class="short">Finds the index of the first matching column for the given dataIndex.</div><div class="long">Finds the index of the first matching column for the given dataIndex.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>col</code> : String<div class="sub-desc">The dataIndex to find</div></li></ul><strong>Returns:</strong><ul><li><code>Number</code><div class="sub-desc">The column index, or -1 if no match was found</div></li></ul></div></div></div></td><td class="msource">ColumnModel</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-fireEvent"></a><b><a href="source/Observable.html#method-Ext.util.Observable-fireEvent">fireEvent</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Object...&nbsp;args</code>&nbsp;)\r
     :\r
@@ -260,7 +260,9 @@ with (columnConfig, index)
 <pre><code><i>// returns an array of column config objects <b>for</b> all hidden columns</i>
 <b>var</b> columns = grid.getColumnModel().getColumnsBy(<b>function</b>(c){
   <b>return</b> c.hidden;
-});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fn</code> : Function<div class="sub-desc"></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional)</div></li></ul><strong>Returns:</strong><ul><li><code>Array</code><div class="sub-desc">result</div></li></ul></div></div></div></td><td class="msource">ColumnModel</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.grid.ColumnModel-getDataIndex"></a><b><a href="source/ColumnModel.html#method-Ext.grid.ColumnModel-getDataIndex">getDataIndex</a></b>(&nbsp;<code>Number&nbsp;col</code>&nbsp;)\r
+});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fn</code> : Function<div class="sub-desc">A function which, when passed a <a href="output/Ext.grid.Column.html" ext:cls="Ext.grid.Column">Column</a> object, must
+return <code>true</code> if the column is to be included in the returned Array.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the function
+is executed. Defaults to this ColumnModel.</div></li></ul><strong>Returns:</strong><ul><li><code>Array</code><div class="sub-desc">result</div></li></ul></div></div></div></td><td class="msource">ColumnModel</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.grid.ColumnModel-getDataIndex"></a><b><a href="source/ColumnModel.html#method-Ext.grid.ColumnModel-getDataIndex">getDataIndex</a></b>(&nbsp;<code>Number&nbsp;col</code>&nbsp;)\r
     :\r
                                         String<div class="mdesc"><div class="short">Returns the dataIndex for the specified column.\r
 // Get field name for the column\r