1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.grid.ColumnModel-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.grid.ColumnModel-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.grid.ColumnModel-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="inner-link" href="#Ext.grid.ColumnModel-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7 <a class="bookmark" href="../docs/?class=Ext.grid.ColumnModel"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
9 <div class="inheritance res-block">
10 <pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11 <img src="resources/elbow-end.gif"/>ColumnModel</pre></div>
12 <h1>Class Ext.grid.ColumnModel</h1>
13 <table cellspacing="0">
14 <tr><td class="label">Package:</td><td class="hd-info">Ext.grid</td></tr>
15 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/ColumnModel.js" target="_blank">ColumnModel.js</a></td></tr>
16 <tr><td class="label">Class:</td><td class="hd-info">ColumnModel</td></tr>
17 <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.grid.PropertyColumnModel" href="output/Ext.grid.PropertyColumnModel.html">PropertyColumnModel</a></td></tr>
18 <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
20 <div class="description">
22 This is the default implementation of a ColumnModel used by the Grid. This class is initialized
23 with an Array of column config objects.
25 An individual column's config object defines the header string, the <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a>
26 field the column draws its data from, an optional rendering function to provide customized
27 data formatting, and the ability to apply a CSS class to all cells in a column through its
28 <a ext:cls="Ext.grid.ColumnModel" ext:member="id" href="output/Ext.grid.ColumnModel.html#id">id</a> config option.<br>
30 <pre><code>var colModel = <b>new</b> Ext.grid.ColumnModel([
31 { header: <em>"Ticker"</em>, width: 60, sortable: true},
32 { header: <em>"Company Name"</em>, width: 150, sortable: true},
33 { header: <em>"Market Cap."</em>, width: 100, sortable: true},
34 { header: <em>"$ Sales"</em>, width: 100, sortable: true, renderer: money},
35 { header: <em>"Employees"</em>, width: 100, sortable: true, resizable: false}
38 The config options <b>defined by</b> this class are options which may appear in each
39 individual column definition. In order to use configuration options from the superclass,
40 specify the column configuration Array in the <tt><b>columns<b><tt> config property. eg:<pre><code>var colModel = <b>new</b> Ext.grid.ColumnModel({
42 widthchange: <b>function</b>(cm, colIndex, width) {
43 saveConfig(colIndex, width);
47 { header: <em>"Ticker"</em>, width: 60, sortable: true},
48 { header: <em>"Company Name"</em>, width: 150, sortable: true},
49 { header: <em>"Market Cap."</em>, width: 100, sortable: true},
50 { header: <em>"$ Sales"</em>, width: 100, sortable: true, renderer: money},
51 { header: <em>"Employees"</em>, width: 100, sortable: true, resizable: false}
53 });</code></pre> </div>
55 <div class="hr"></div>
56 <a id="Ext.grid.ColumnModel-configs"></a>
57 <h2>Config Options</h2>
58 <table cellspacing="0" class="member-table">
60 <th class="sig-header" colspan="2">Config Options</th>
61 <th class="msource-header">Defined By</th>
63 <tr class="config-row">
\r
64 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
66 <a id="Ext.grid.ColumnModel-align"></a>
\r
67 <b>align</b> : String <div class="mdesc">
\r
68 (optional) Set the CSS text-align property of the column. Defaults to undefined. </div>
\r
70 <td class="msource">ColumnModel</td>
\r
72 <tr class="config-row alt">
\r
73 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
75 <a id="Ext.grid.ColumnModel-css"></a>
\r
76 <b>css</b> : String <div class="mdesc">
\r
77 (optional) Set custom CSS for all table cells in the column (excluding headers). Defaults to undefined. </div>
\r
79 <td class="msource">ColumnModel</td>
\r
81 <tr class="config-row expandable">
\r
82 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
84 <a id="Ext.grid.ColumnModel-dataIndex"></a>
\r
85 <b>dataIndex</b> : String <div class="mdesc">
\r
86 <div class="short">(optional) The name of the field in the grid's Ext.data.Store's Ext.data.Record definition from which to draw the col...</div>
\r
88 (optional) The name of the field in the grid's <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>'s <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> definition from which to draw the column's value. If not specified, the column's index is used as an index into the Record's data Array. </div>
\r
91 <td class="msource">ColumnModel</td>
\r
93 <tr class="config-row alt">
\r
94 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
96 <a id="Ext.grid.ColumnModel-editor"></a>
\r
97 <b>editor</b> : Ext.form.Field <div class="mdesc">
\r
98 (optional) The <a ext:cls="Ext.form.Field" href="output/Ext.form.Field.html">Ext.form.Field</a> to use when editing values in this column if editing is supported by the grid. </div>
\r
100 <td class="msource">ColumnModel</td>
\r
102 <tr class="config-row">
\r
103 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
105 <a id="Ext.grid.ColumnModel-fixed"></a>
\r
106 <b>fixed</b> : Boolean <div class="mdesc">
\r
107 (optional) True if the column width cannot be changed. Defaults to false. </div>
\r
109 <td class="msource">ColumnModel</td>
\r
111 <tr class="config-row alt">
\r
112 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
114 <a id="Ext.grid.ColumnModel-header"></a>
\r
115 <b>header</b> : String <div class="mdesc">
\r
116 The header text to display in the Grid view. </div>
\r
118 <td class="msource">ColumnModel</td>
\r
120 <tr class="config-row">
\r
121 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
123 <a id="Ext.grid.ColumnModel-hidden"></a>
\r
124 <b>hidden</b> : Boolean <div class="mdesc">
\r
125 (optional) True to hide the column. Defaults to false. </div>
\r
127 <td class="msource">ColumnModel</td>
\r
129 <tr class="config-row alt expandable">
\r
130 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
132 <a id="Ext.grid.ColumnModel-hideable"></a>
\r
133 <b>hideable</b> : Boolean <div class="mdesc">
\r
134 <div class="short">(optional) Specify as false to prevent the user from hiding this column (defaults to true). To disallow column hiding...</div>
\r
136 (optional) Specify as <tt>false</tt> to prevent the user from hiding this column (defaults to true). To disallow column hiding globally for all columns in the grid, use <a ext:cls="Ext.grid.GridPanel" ext:member="enableColumnHide" href="output/Ext.grid.GridPanel.html#enableColumnHide">Ext.grid.GridPanel.enableColumnHide</a> instead. </div>
\r
139 <td class="msource">ColumnModel</td>
\r
141 <tr class="config-row expandable">
\r
142 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
144 <a id="Ext.grid.ColumnModel-id"></a>
\r
145 <b>id</b> : String <div class="mdesc">
\r
146 <div class="short">(optional) Defaults to the column's initial ordinal position. A name which identifies this column. The id is used to ...</div>
\r
148 (optional) Defaults to the column's initial ordinal position. A name which identifies this column. The id is used to create a CSS class name which is applied to all table cells (including headers) in that column. The class name takes the form of <pre>x-grid3-td-<b>id</b></pre> <br><br> Header cells will also recieve this class name, but will also have the class <pr>x-grid3-hd</pre>, so to target header cells, use CSS selectors such as:<pre>.x-grid3-hd.x-grid3-td-<b>id</b></pre> The <a ext:cls="Ext.grid.GridPanel" ext:member="autoExpandColumn" href="output/Ext.grid.GridPanel.html#autoExpandColumn">Ext.grid.GridPanel.autoExpandColumn</a> grid config option references the column via this identifier. </div>
\r
151 <td class="msource">ColumnModel</td>
\r
153 <tr class="config-row inherited alt expandable">
\r
154 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
156 <a id="Ext.grid.ColumnModel-listeners"></a>
\r
157 <b>listeners</b> : Object <div class="mdesc">
\r
158 <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
\r
160 (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
\r
163 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
\r
165 <tr class="config-row">
\r
166 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
168 <a id="Ext.grid.ColumnModel-menuDisabled"></a>
\r
169 <b>menuDisabled</b> : Boolean <div class="mdesc">
\r
170 (optional) True to disable the column menu. Defaults to false. </div>
\r
172 <td class="msource">ColumnModel</td>
\r
174 <tr class="config-row alt expandable">
\r
175 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
177 <a id="Ext.grid.ColumnModel-renderer"></a>
\r
178 <b>renderer</b> : Function <div class="mdesc">
\r
179 <div class="short">(optional) A function used to generate HTML markup for a cell given the cell's data value. See setRenderer. If not sp...</div>
\r
181 (optional) A function used to generate HTML markup for a cell given the cell's data value. See <a ext:cls="Ext.grid.ColumnModel" ext:member="setRenderer" href="output/Ext.grid.ColumnModel.html#setRenderer">setRenderer</a>. If not specified, the default renderer uses the raw data value. </div>
\r
184 <td class="msource">ColumnModel</td>
\r
186 <tr class="config-row">
\r
187 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
189 <a id="Ext.grid.ColumnModel-resizable"></a>
\r
190 <b>resizable</b> : Boolean <div class="mdesc">
\r
191 (optional) False to disable column resizing. Defaults to true. </div>
\r
193 <td class="msource">ColumnModel</td>
\r
195 <tr class="config-row alt expandable">
\r
196 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
198 <a id="Ext.grid.ColumnModel-sortable"></a>
\r
199 <b>sortable</b> : Boolean <div class="mdesc">
\r
200 <div class="short">(optional) True if sorting is to be allowed on this column. Defaults to the value of the defaultSortable property. Wh...</div>
\r
202 (optional) True if sorting is to be allowed on this column. Defaults to the value of the <a ext:cls="Ext.grid.ColumnModel" ext:member="defaultSortable" href="output/Ext.grid.ColumnModel.html#defaultSortable">defaultSortable</a> property. Whether local/remote sorting is used is specified in <a ext:cls="Ext.data.Store" ext:member="remoteSort" href="output/Ext.data.Store.html#remoteSort">Ext.data.Store.remoteSort</a>. </div>
\r
205 <td class="msource">ColumnModel</td>
\r
207 <tr class="config-row expandable">
\r
208 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
210 <a id="Ext.grid.ColumnModel-tooltip"></a>
\r
211 <b>tooltip</b> : String <div class="mdesc">
\r
212 <div class="short">(optional) A text string to use as the column header's tooltip. If Quicktips are enabled, this value will be used as ...</div>
\r
214 (optional) A text string to use as the column header's tooltip. If Quicktips are enabled, this value will be used as the text of the quick tip, otherwise it will be set as the header's HTML title attribute. Defaults to ''. </div>
\r
217 <td class="msource">ColumnModel</td>
\r
219 <tr class="config-row alt expandable">
\r
220 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
222 <a id="Ext.grid.ColumnModel-width"></a>
\r
223 <b>width</b> : Number <div class="mdesc">
\r
224 <div class="short">(optional) The initial width in pixels of the column. This is ignored if the Grid's view is configured with forceFit ...</div>
\r
226 (optional) The initial width in pixels of the column. This is ignored if the Grid's <a ext:cls="Ext.grid.GridView" href="output/Ext.grid.GridView.html">view</a> is configured with <a ext:cls="Ext.grid.GridView" ext:member="forceFit" href="output/Ext.grid.GridView.html#forceFit">forceFit</a> true. </div>
\r
229 <td class="msource">ColumnModel</td>
\r
232 <a id="Ext.grid.ColumnModel-props"></a>
233 <h2>Public Properties</h2>
234 <table cellspacing="0" class="member-table">
236 <th class="sig-header" colspan="2">Property</th>
237 <th class="msource-header">Defined By</th>
239 <tr class="property-row">
\r
240 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
242 <a id="Ext.grid.ColumnModel-defaultSortable"></a>
\r
243 <b>defaultSortable</b> : Boolean <div class="mdesc">
\r
244 Default sortable of columns which have no sortable specified (defaults to false) </div>
\r
246 <td class="msource">ColumnModel</td>
\r
248 <tr class="property-row alt">
\r
249 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
251 <a id="Ext.grid.ColumnModel-defaultWidth"></a>
\r
252 <b>defaultWidth</b> : Number <div class="mdesc">
\r
253 The width of columns which have no width specified (defaults to 100) </div>
\r
255 <td class="msource">ColumnModel</td>
\r
258 <a id="Ext.grid.ColumnModel-methods"></a>
259 <h2>Public Methods</h2>
260 <table cellspacing="0" class="member-table">
262 <th class="sig-header" colspan="2">Method</th>
263 <th class="msource-header">Defined By</th>
265 <tr class="method-row expandable">
\r
266 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
268 <a id="Ext.grid.ColumnModel-ColumnModel"></a>
\r
269 <b>ColumnModel</b>( <code>Object config</code> ) <div class="mdesc">
\r
270 <div class="short"></div>
\r
272 <div class="mdetail-params">
\r
273 <strong>Parameters:</strong>
\r
274 <ul><li><code>config</code> : Object<div class="sub-desc">An Array of column config objects. See this class's
275 config objects for details.</div></li> </ul>
\r
276 <strong>Returns:</strong>
\r
278 <li><code></code></li>
\r
284 <td class="msource">ColumnModel</td>
\r
286 <tr class="method-row inherited alt expandable">
\r
287 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
289 <a id="Ext.grid.ColumnModel-addEvents"></a>
\r
290 <b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
\r
291 <div class="short">Used to define events on this Observable</div>
\r
293 Used to define events on this Observable <div class="mdetail-params">
\r
294 <strong>Parameters:</strong>
\r
295 <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
\r
296 <strong>Returns:</strong>
\r
298 <li><code>void</code></li>
\r
304 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
\r
306 <tr class="method-row inherited expandable">
\r
307 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
309 <a id="Ext.grid.ColumnModel-addListener"></a>
\r
310 <b>addListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
\r
311 <div class="short">Appends an event handler to this component</div>
\r
313 Appends an event handler to this component <div class="mdetail-params">
\r
314 <strong>Parameters:</strong>
\r
315 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
316 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
317 properties. This may contain any of the following properties:<ul>
318 <li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
319 <li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
320 <li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
321 <li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
322 by the specified number of milliseconds. If the event fires again within that time, the original
323 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
326 <b>Combining Options</b><br>
327 Using the options argument, it is possible to combine different types of listeners:<br>
329 A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
330 <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
336 <b>Attaching multiple handlers in 1 call</b><br>
337 The method also allows for a single argument to be passed which is a config object containing properties
338 which specify multiple handlers.
342 fn: <b>this</b>.onClick,
346 <em>'mouseover'</em> : {
347 fn: <b>this</b>.onMouseOver,
350 <em>'mouseout'</em> : {
351 fn: <b>this</b>.onMouseOut,
356 Or a shorthand syntax:<br>
358 <em>'click'</em> : <b>this</b>.onClick,
359 <em>'mouseover'</em> : <b>this</b>.onMouseOver,
360 <em>'mouseout'</em> : <b>this</b>.onMouseOut,
362 });</code></pre></div></li> </ul>
\r
363 <strong>Returns:</strong>
\r
365 <li><code>void</code></li>
\r
371 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
\r
373 <tr class="method-row alt expandable">
\r
374 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
376 <a id="Ext.grid.ColumnModel-findColumnIndex"></a>
\r
377 <b>findColumnIndex</b>( <code>String col</code> ) : Number <div class="mdesc">
\r
378 <div class="short">Finds the index of the first matching column for the given dataIndex.</div>
\r
380 Finds the index of the first matching column for the given dataIndex. <div class="mdetail-params">
\r
381 <strong>Parameters:</strong>
\r
382 <ul><li><code>col</code> : String<div class="sub-desc">The dataIndex to find</div></li> </ul>
\r
383 <strong>Returns:</strong>
\r
385 <li><code>Number</code><div class="sub-desc">The column index, or -1 if no match was found</div></li>
\r
391 <td class="msource">ColumnModel</td>
\r
393 <tr class="method-row inherited expandable">
\r
394 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
396 <a id="Ext.grid.ColumnModel-fireEvent"></a>
\r
397 <b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
\r
398 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
\r
400 Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
\r
401 <strong>Parameters:</strong>
\r
402 <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
\r
403 <strong>Returns:</strong>
\r
405 <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
\r
411 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
\r
413 <tr class="method-row alt expandable">
\r
414 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
416 <a id="Ext.grid.ColumnModel-getCellEditor"></a>
\r
417 <b>getCellEditor</b>( <code>Number colIndex</code>, <code>Number rowIndex</code> ) : Ext.Editor <div class="mdesc">
\r
418 <div class="short">Returns the editor defined for the cell/column.</div>
\r
420 Returns the editor defined for the cell/column. <div class="mdetail-params">
\r
421 <strong>Parameters:</strong>
\r
422 <ul><li><code>colIndex</code> : Number<div class="sub-desc">The column index</div></li><li><code>rowIndex</code> : Number<div class="sub-desc">The row index</div></li> </ul>
\r
423 <strong>Returns:</strong>
\r
425 <li><code>Ext.Editor</code><div class="sub-desc">The {@link Ext.Editor Editor} that was created to wrap the {@link Ext.form.Field Field} used to edit the cell.</div></li>
\r
431 <td class="msource">ColumnModel</td>
\r
433 <tr class="method-row expandable">
\r
434 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
436 <a id="Ext.grid.ColumnModel-getColumnById"></a>
\r
437 <b>getColumnById</b>( <code>String id</code> ) : Object <div class="mdesc">
\r
438 <div class="short">Returns the column for a specified id.</div>
\r
440 Returns the column for a specified id. <div class="mdetail-params">
\r
441 <strong>Parameters:</strong>
\r
442 <ul><li><code>id</code> : String<div class="sub-desc">The column id</div></li> </ul>
\r
443 <strong>Returns:</strong>
\r
445 <li><code>Object</code><div class="sub-desc">the column</div></li>
\r
451 <td class="msource">ColumnModel</td>
\r
453 <tr class="method-row alt expandable">
\r
454 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
456 <a id="Ext.grid.ColumnModel-getColumnCount"></a>
\r
457 <b>getColumnCount</b>( <code>Boolean visibleOnly</code> ) : Number <div class="mdesc">
\r
458 <div class="short">Returns the number of columns.</div>
\r
460 Returns the number of columns. <div class="mdetail-params">
\r
461 <strong>Parameters:</strong>
\r
462 <ul><li><code>visibleOnly</code> : Boolean<div class="sub-desc">Optional. Pass as true to only include visible columns.</div></li> </ul>
\r
463 <strong>Returns:</strong>
\r
465 <li><code>Number</code></li>
\r
471 <td class="msource">ColumnModel</td>
\r
473 <tr class="method-row expandable">
\r
474 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
476 <a id="Ext.grid.ColumnModel-getColumnHeader"></a>
\r
477 <b>getColumnHeader</b>( <code>Number col</code> ) : String <div class="mdesc">
\r
478 <div class="short">Returns the header for the specified column.</div>
\r
480 Returns the header for the specified column. <div class="mdetail-params">
\r
481 <strong>Parameters:</strong>
\r
482 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
483 <strong>Returns:</strong>
\r
485 <li><code>String</code></li>
\r
491 <td class="msource">ColumnModel</td>
\r
493 <tr class="method-row alt expandable">
\r
494 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
496 <a id="Ext.grid.ColumnModel-getColumnId"></a>
\r
497 <b>getColumnId</b>( <code>Number index</code> ) : String <div class="mdesc">
\r
499 Returns the id of the column at the specified index.</div>
\r
502 Returns the id of the column at the specified index. <div class="mdetail-params">
\r
503 <strong>Parameters:</strong>
\r
504 <ul><li><code>index</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
505 <strong>Returns:</strong>
\r
507 <li><code>String</code><div class="sub-desc">the id</div></li>
\r
513 <td class="msource">ColumnModel</td>
\r
515 <tr class="method-row expandable">
\r
516 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
518 <a id="Ext.grid.ColumnModel-getColumnTooltip"></a>
\r
519 <b>getColumnTooltip</b>( <code>Number col</code> ) : String <div class="mdesc">
\r
520 <div class="short">Returns the tooltip for the specified column.</div>
\r
522 Returns the tooltip for the specified column. <div class="mdetail-params">
\r
523 <strong>Parameters:</strong>
\r
524 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
525 <strong>Returns:</strong>
\r
527 <li><code>String</code></li>
\r
533 <td class="msource">ColumnModel</td>
\r
535 <tr class="method-row alt expandable">
\r
536 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
538 <a id="Ext.grid.ColumnModel-getColumnWidth"></a>
\r
539 <b>getColumnWidth</b>( <code>Number col</code> ) : Number <div class="mdesc">
\r
540 <div class="short">Returns the width for the specified column.</div>
\r
542 Returns the width for the specified column. <div class="mdetail-params">
\r
543 <strong>Parameters:</strong>
\r
544 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
545 <strong>Returns:</strong>
\r
547 <li><code>Number</code></li>
\r
553 <td class="msource">ColumnModel</td>
\r
555 <tr class="method-row expandable">
\r
556 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
558 <a id="Ext.grid.ColumnModel-getColumnsBy"></a>
\r
559 <b>getColumnsBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Array <div class="mdesc">
\r
560 <div class="short">Returns the column configs that return true by the passed function that is called with (columnConfig, index)</div>
\r
562 Returns the column configs that return true by the passed function that is called with (columnConfig, index) <div class="mdetail-params">
\r
563 <strong>Parameters:</strong>
\r
564 <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>
\r
565 <strong>Returns:</strong>
\r
567 <li><code>Array</code><div class="sub-desc">result</div></li>
\r
573 <td class="msource">ColumnModel</td>
\r
575 <tr class="method-row alt expandable">
\r
576 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
578 <a id="Ext.grid.ColumnModel-getDataIndex"></a>
\r
579 <b>getDataIndex</b>( <code>Number col</code> ) : String <div class="mdesc">
\r
580 <div class="short">Returns the dataIndex for the specified column.</div>
\r
582 Returns the dataIndex for the specified column. <div class="mdetail-params">
\r
583 <strong>Parameters:</strong>
\r
584 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
585 <strong>Returns:</strong>
\r
587 <li><code>String</code><div class="sub-desc">The column's dataIndex</div></li>
\r
593 <td class="msource">ColumnModel</td>
\r
595 <tr class="method-row expandable">
\r
596 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
598 <a id="Ext.grid.ColumnModel-getIndexById"></a>
\r
599 <b>getIndexById</b>( <code>String id</code> ) : Number <div class="mdesc">
\r
600 <div class="short">Returns the index for a specified column id.</div>
\r
602 Returns the index for a specified column id. <div class="mdetail-params">
\r
603 <strong>Parameters:</strong>
\r
604 <ul><li><code>id</code> : String<div class="sub-desc">The column id</div></li> </ul>
\r
605 <strong>Returns:</strong>
\r
607 <li><code>Number</code><div class="sub-desc">the index, or -1 if not found</div></li>
\r
613 <td class="msource">ColumnModel</td>
\r
615 <tr class="method-row alt expandable">
\r
616 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
618 <a id="Ext.grid.ColumnModel-getRenderer"></a>
\r
619 <b>getRenderer</b>( <code>Number col</code> ) : Function <div class="mdesc">
\r
620 <div class="short">Returns the rendering (formatting) function defined for the column.</div>
\r
622 Returns the rendering (formatting) function defined for the column. <div class="mdetail-params">
\r
623 <strong>Parameters:</strong>
\r
624 <ul><li><code>col</code> : Number<div class="sub-desc">The column index.</div></li> </ul>
\r
625 <strong>Returns:</strong>
\r
627 <li><code>Function</code><div class="sub-desc">The function used to render the cell. See {@link #setRenderer}.</div></li>
\r
633 <td class="msource">ColumnModel</td>
\r
635 <tr class="method-row expandable">
\r
636 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
638 <a id="Ext.grid.ColumnModel-getTotalWidth"></a>
\r
639 <b>getTotalWidth</b>( <code>Boolean includeHidden</code> ) : Number <div class="mdesc">
\r
640 <div class="short">Returns the total width of all columns.</div>
\r
642 Returns the total width of all columns. <div class="mdetail-params">
\r
643 <strong>Parameters:</strong>
\r
644 <ul><li><code>includeHidden</code> : Boolean<div class="sub-desc">True to include hidden column widths</div></li> </ul>
\r
645 <strong>Returns:</strong>
\r
647 <li><code>Number</code></li>
\r
653 <td class="msource">ColumnModel</td>
\r
655 <tr class="method-row inherited alt expandable">
\r
656 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
658 <a id="Ext.grid.ColumnModel-hasListener"></a>
\r
659 <b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
\r
660 <div class="short">Checks to see if this object has any listeners for a specified event</div>
\r
662 Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
\r
663 <strong>Parameters:</strong>
\r
664 <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
\r
665 <strong>Returns:</strong>
\r
667 <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
\r
673 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
\r
675 <tr class="method-row expandable">
\r
676 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
678 <a id="Ext.grid.ColumnModel-isCellEditable"></a>
\r
679 <b>isCellEditable</b>( <code>Number colIndex</code>, <code>Number rowIndex</code> ) : Boolean <div class="mdesc">
\r
680 <div class="short">Returns true if the cell is editable.</div>
\r
682 Returns true if the cell is editable. <div class="mdetail-params">
\r
683 <strong>Parameters:</strong>
\r
684 <ul><li><code>colIndex</code> : Number<div class="sub-desc">The column index</div></li><li><code>rowIndex</code> : Number<div class="sub-desc">The row index</div></li> </ul>
\r
685 <strong>Returns:</strong>
\r
687 <li><code>Boolean</code></li>
\r
693 <td class="msource">ColumnModel</td>
\r
695 <tr class="method-row alt expandable">
\r
696 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
698 <a id="Ext.grid.ColumnModel-isFixed"></a>
\r
699 <b>isFixed</b>() : void <div class="mdesc">
\r
700 <div class="short">Returns true if the column width cannot be changed</div>
\r
702 Returns true if the column width cannot be changed <div class="mdetail-params">
\r
703 <strong>Parameters:</strong>
\r
704 <ul><li>None.</li> </ul>
\r
705 <strong>Returns:</strong>
\r
707 <li><code>void</code></li>
\r
713 <td class="msource">ColumnModel</td>
\r
715 <tr class="method-row expandable">
\r
716 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
718 <a id="Ext.grid.ColumnModel-isHidden"></a>
\r
719 <b>isHidden</b>( <code>Number colIndex</code> ) : Boolean <div class="mdesc">
\r
720 <div class="short">Returns true if the column is hidden.</div>
\r
722 Returns true if the column is hidden. <div class="mdetail-params">
\r
723 <strong>Parameters:</strong>
\r
724 <ul><li><code>colIndex</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
725 <strong>Returns:</strong>
\r
727 <li><code>Boolean</code></li>
\r
733 <td class="msource">ColumnModel</td>
\r
735 <tr class="method-row alt expandable">
\r
736 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
738 <a id="Ext.grid.ColumnModel-isMenuDisabled"></a>
\r
739 <b>isMenuDisabled</b>( <code>Number col</code> ) : Boolean <div class="mdesc">
\r
740 <div class="short">Returns true if the specified column menu is disabled.</div>
\r
742 Returns true if the specified column menu is disabled. <div class="mdetail-params">
\r
743 <strong>Parameters:</strong>
\r
744 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
745 <strong>Returns:</strong>
\r
747 <li><code>Boolean</code></li>
\r
753 <td class="msource">ColumnModel</td>
\r
755 <tr class="method-row expandable">
\r
756 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
758 <a id="Ext.grid.ColumnModel-isResizable"></a>
\r
759 <b>isResizable</b>() : Boolean <div class="mdesc">
\r
760 <div class="short">Returns true if the column can be resized</div>
\r
762 Returns true if the column can be resized <div class="mdetail-params">
\r
763 <strong>Parameters:</strong>
\r
764 <ul><li>None.</li> </ul>
\r
765 <strong>Returns:</strong>
\r
767 <li><code>Boolean</code></li>
\r
773 <td class="msource">ColumnModel</td>
\r
775 <tr class="method-row alt expandable">
\r
776 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
778 <a id="Ext.grid.ColumnModel-isSortable"></a>
\r
779 <b>isSortable</b>( <code>Number col</code> ) : Boolean <div class="mdesc">
\r
780 <div class="short">Returns true if the specified column is sortable.</div>
\r
782 Returns true if the specified column is sortable. <div class="mdetail-params">
\r
783 <strong>Parameters:</strong>
\r
784 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
\r
785 <strong>Returns:</strong>
\r
787 <li><code>Boolean</code></li>
\r
793 <td class="msource">ColumnModel</td>
\r
795 <tr class="method-row expandable">
\r
796 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
798 <a id="Ext.grid.ColumnModel-moveColumn"></a>
\r
799 <b>moveColumn</b>( <code>Number oldIndex</code>, <code>Number newIndex</code> ) : void <div class="mdesc">
\r
800 <div class="short">Moves a column from one position to another.</div>
\r
802 Moves a column from one position to another. <div class="mdetail-params">
\r
803 <strong>Parameters:</strong>
\r
804 <ul><li><code>oldIndex</code> : Number<div class="sub-desc">The index of the column to move.</div></li><li><code>newIndex</code> : Number<div class="sub-desc">The position at which to reinsert the coolumn.</div></li> </ul>
\r
805 <strong>Returns:</strong>
\r
807 <li><code>void</code></li>
\r
813 <td class="msource">ColumnModel</td>
\r
815 <tr class="method-row inherited alt expandable">
\r
816 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
818 <a id="Ext.grid.ColumnModel-on"></a>
\r
819 <b>on</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
\r
820 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
\r
822 Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
\r
823 <strong>Parameters:</strong>
\r
824 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
825 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
\r
826 <strong>Returns:</strong>
\r
828 <li><code>void</code></li>
\r
834 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
\r
836 <tr class="method-row inherited expandable">
\r
837 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
839 <a id="Ext.grid.ColumnModel-purgeListeners"></a>
\r
840 <b>purgeListeners</b>() : void <div class="mdesc">
\r
841 <div class="short">Removes all listeners for this object</div>
\r
843 Removes all listeners for this object <div class="mdetail-params">
\r
844 <strong>Parameters:</strong>
\r
845 <ul><li>None.</li> </ul>
\r
846 <strong>Returns:</strong>
\r
848 <li><code>void</code></li>
\r
854 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
\r
856 <tr class="method-row inherited alt expandable">
\r
857 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
859 <a id="Ext.grid.ColumnModel-relayEvents"></a>
\r
860 <b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc">
\r
861 <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
\r
863 Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params">
\r
864 <strong>Parameters:</strong>
\r
865 <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul>
\r
866 <strong>Returns:</strong>
\r
868 <li><code>void</code></li>
\r
874 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
\r
876 <tr class="method-row inherited expandable">
\r
877 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
879 <a id="Ext.grid.ColumnModel-removeListener"></a>
\r
880 <b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
881 <div class="short">Removes a listener</div>
\r
883 Removes a listener <div class="mdetail-params">
\r
884 <strong>Parameters:</strong>
\r
885 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
\r
886 <strong>Returns:</strong>
\r
888 <li><code>void</code></li>
\r
894 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
\r
896 <tr class="method-row inherited alt expandable">
\r
897 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
899 <a id="Ext.grid.ColumnModel-resumeEvents"></a>
\r
900 <b>resumeEvents</b>() : void <div class="mdesc">
\r
901 <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
\r
903 Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>) <div class="mdetail-params">
\r
904 <strong>Parameters:</strong>
\r
905 <ul><li>None.</li> </ul>
\r
906 <strong>Returns:</strong>
\r
908 <li><code>void</code></li>
\r
914 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
\r
916 <tr class="method-row expandable">
\r
917 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
919 <a id="Ext.grid.ColumnModel-setColumnHeader"></a>
\r
920 <b>setColumnHeader</b>( <code>Number col</code>, <code>String header</code> ) : void <div class="mdesc">
\r
921 <div class="short">Sets the header for a column.</div>
\r
923 Sets the header for a column. <div class="mdetail-params">
\r
924 <strong>Parameters:</strong>
\r
925 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>header</code> : String<div class="sub-desc">The new header</div></li> </ul>
\r
926 <strong>Returns:</strong>
\r
928 <li><code>void</code></li>
\r
934 <td class="msource">ColumnModel</td>
\r
936 <tr class="method-row alt expandable">
\r
937 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
939 <a id="Ext.grid.ColumnModel-setColumnTooltip"></a>
\r
940 <b>setColumnTooltip</b>( <code>Number col</code>, <code>String tooltip</code> ) : void <div class="mdesc">
\r
941 <div class="short">Sets the tooltip for a column.</div>
\r
943 Sets the tooltip for a column. <div class="mdetail-params">
\r
944 <strong>Parameters:</strong>
\r
945 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>tooltip</code> : String<div class="sub-desc">The new tooltip</div></li> </ul>
\r
946 <strong>Returns:</strong>
\r
948 <li><code>void</code></li>
\r
954 <td class="msource">ColumnModel</td>
\r
956 <tr class="method-row expandable">
\r
957 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
959 <a id="Ext.grid.ColumnModel-setColumnWidth"></a>
\r
960 <b>setColumnWidth</b>( <code>Number col</code>, <code>Number width</code> ) : void <div class="mdesc">
\r
961 <div class="short">Sets the width for a column.</div>
\r
963 Sets the width for a column. <div class="mdetail-params">
\r
964 <strong>Parameters:</strong>
\r
965 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>width</code> : Number<div class="sub-desc">The new width</div></li> </ul>
\r
966 <strong>Returns:</strong>
\r
968 <li><code>void</code></li>
\r
974 <td class="msource">ColumnModel</td>
\r
976 <tr class="method-row alt expandable">
\r
977 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
979 <a id="Ext.grid.ColumnModel-setConfig"></a>
\r
980 <b>setConfig</b>( <code>Array config</code> ) : void <div class="mdesc">
\r
981 <div class="short">Reconfigures this column model according to the passed Array of column definition objects. For a description of
984 <p>Reconfigures this column model according to the passed Array of column definition objects. For a description of
985 the individual properties of a column definition object, see the <a href="#Ext.grid.ColumnModel-configs">Config Options</a>.</p>
986 <p>Causes the <a ext:cls="Ext.grid.ColumnModel" ext:member="configchange" href="output/Ext.grid.ColumnModel.html#configchange">configchange</a> event to be fired. A <a ext:cls="Ext.grid.GridPanel" href="output/Ext.grid.GridPanel.html">GridPanel</a> using
987 this ColumnModel will listen for this event and refresh its UI automatically.</p> <div class="mdetail-params">
\r
988 <strong>Parameters:</strong>
\r
989 <ul><li><code>config</code> : Array<div class="sub-desc">Array of Column definition objects.</div></li> </ul>
\r
990 <strong>Returns:</strong>
\r
992 <li><code>void</code></li>
\r
998 <td class="msource">ColumnModel</td>
\r
1000 <tr class="method-row expandable">
\r
1001 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1003 <a id="Ext.grid.ColumnModel-setDataIndex"></a>
\r
1004 <b>setDataIndex</b>( <code>Number col</code>, <code>String dataIndex</code> ) : void <div class="mdesc">
\r
1005 <div class="short">Sets the dataIndex for a column.</div>
\r
1006 <div class="long">
\r
1007 Sets the dataIndex for a column. <div class="mdetail-params">
\r
1008 <strong>Parameters:</strong>
\r
1009 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>dataIndex</code> : String<div class="sub-desc">The new dataIndex</div></li> </ul>
\r
1010 <strong>Returns:</strong>
\r
1012 <li><code>void</code></li>
\r
1018 <td class="msource">ColumnModel</td>
\r
1020 <tr class="method-row alt expandable">
\r
1021 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1023 <a id="Ext.grid.ColumnModel-setEditable"></a>
\r
1024 <b>setEditable</b>( <code>Number col</code>, <code>Boolean editable</code> ) : void <div class="mdesc">
\r
1025 <div class="short">Sets if a column is editable.</div>
\r
1026 <div class="long">
\r
1027 Sets if a column is editable. <div class="mdetail-params">
\r
1028 <strong>Parameters:</strong>
\r
1029 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>editable</code> : Boolean<div class="sub-desc">True if the column is editable</div></li> </ul>
\r
1030 <strong>Returns:</strong>
\r
1032 <li><code>void</code></li>
\r
1038 <td class="msource">ColumnModel</td>
\r
1040 <tr class="method-row expandable">
\r
1041 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1043 <a id="Ext.grid.ColumnModel-setEditor"></a>
\r
1044 <b>setEditor</b>( <code>Number col</code>, <code>Object editor</code> ) : void <div class="mdesc">
\r
1045 <div class="short">Sets the editor for a column.</div>
\r
1046 <div class="long">
\r
1047 Sets the editor for a column. <div class="mdetail-params">
\r
1048 <strong>Parameters:</strong>
\r
1049 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>editor</code> : Object<div class="sub-desc">The editor object</div></li> </ul>
\r
1050 <strong>Returns:</strong>
\r
1052 <li><code>void</code></li>
\r
1058 <td class="msource">ColumnModel</td>
\r
1060 <tr class="method-row alt expandable">
\r
1061 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1063 <a id="Ext.grid.ColumnModel-setHidden"></a>
\r
1064 <b>setHidden</b>( <code>Number colIndex</code>, <code>Boolean hidden</code> ) : void <div class="mdesc">
\r
1065 <div class="short">Sets if a column is hidden.</div>
\r
1066 <div class="long">
\r
1067 Sets if a column is hidden. <div class="mdetail-params">
\r
1068 <strong>Parameters:</strong>
\r
1069 <ul><li><code>colIndex</code> : Number<div class="sub-desc">The column index</div></li><li><code>hidden</code> : Boolean<div class="sub-desc">True if the column is hidden</div></li> </ul>
\r
1070 <strong>Returns:</strong>
\r
1072 <li><code>void</code></li>
\r
1078 <td class="msource">ColumnModel</td>
\r
1080 <tr class="method-row expandable">
\r
1081 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1083 <a id="Ext.grid.ColumnModel-setRenderer"></a>
\r
1084 <b>setRenderer</b>( <code>Number col</code>, <code>Function fn</code> ) : void <div class="mdesc">
\r
1085 <div class="short">Sets the rendering (formatting) function for a column. See <a ext:cls="Ext.util.Format" href="output/Ext.util.Format.html">Ext.util.Format</a> for some
1086 default formatting functions.</div>
\r
1087 <div class="long">
\r
1088 Sets the rendering (formatting) function for a column. See <a ext:cls="Ext.util.Format" href="output/Ext.util.Format.html">Ext.util.Format</a> for some
1089 default formatting functions. <div class="mdetail-params">
\r
1090 <strong>Parameters:</strong>
\r
1091 <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>fn</code> : Function<div class="sub-desc">The function to use to process the cell's raw data
1092 to return HTML markup for the grid view. The render function is called with
1093 the following parameters:<ul>
1094 <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
1095 <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
1096 <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
1097 <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container element <i>within</i> the table cell
1098 (e.g. 'style="color:red;"').</p></li></ul></p></li>
1099 <li><b>record</b> : Ext.data.record<p class="sub-desc">The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> from which the data was extracted.</p></li>
1100 <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
1101 <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
1102 <li><b>store</b> : Ext.data.Store<p class="sub-desc">The <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> object from which the Record was extracted.</p></li></ul></div></li> </ul>
\r
1103 <strong>Returns:</strong>
\r
1105 <li><code>void</code></li>
\r
1111 <td class="msource">ColumnModel</td>
\r
1113 <tr class="method-row inherited alt expandable">
\r
1114 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1116 <a id="Ext.grid.ColumnModel-suspendEvents"></a>
\r
1117 <b>suspendEvents</b>() : void <div class="mdesc">
\r
1118 <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
\r
1119 <div class="long">
\r
1120 Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>) <div class="mdetail-params">
\r
1121 <strong>Parameters:</strong>
\r
1122 <ul><li>None.</li> </ul>
\r
1123 <strong>Returns:</strong>
\r
1125 <li><code>void</code></li>
\r
1131 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
\r
1133 <tr class="method-row inherited expandable">
\r
1134 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1136 <a id="Ext.grid.ColumnModel-un"></a>
\r
1137 <b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
1138 <div class="short">Removes a listener (shorthand for removeListener)</div>
\r
1139 <div class="long">
\r
1140 Removes a listener (shorthand for removeListener) <div class="mdetail-params">
\r
1141 <strong>Parameters:</strong>
\r
1142 <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
\r
1143 <strong>Returns:</strong>
\r
1145 <li><code>void</code></li>
\r
1151 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
\r
1154 <a id="Ext.grid.ColumnModel-events"></a>
1155 <h2>Public Events</h2>
1156 <table cellspacing="0" class="member-table">
1158 <th class="sig-header" colspan="2">Event</th>
1159 <th class="msource-header">Defined By</th>
1161 <tr class="event-row expandable">
\r
1162 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1164 <a id="Ext.grid.ColumnModel-columnmoved"></a>
\r
1165 <b>columnmoved</b> : ( <code>ColumnModel this</code>, <code>Number oldIndex</code>, <code>Number newIndex</code> ) <div class="mdesc">
\r
1166 <div class="short">Fires when a column is moved.</div>
\r
1167 <div class="long">
\r
1168 Fires when a column is moved. <div class="mdetail-params">
\r
1169 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1170 <ul><li><code>this</code> : ColumnModel<div class="sub-desc"></div></li><li><code>oldIndex</code> : Number<div class="sub-desc"></div></li><li><code>newIndex</code> : Number<div class="sub-desc"></div></li> </ul>
\r
1175 <td class="msource">ColumnModel</td>
\r
1177 <tr class="event-row alt expandable">
\r
1178 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1180 <a id="Ext.grid.ColumnModel-configchange"></a>
\r
1181 <b>configchange</b> : ( <code>ColumnModel this</code> ) <div class="mdesc">
\r
1182 <div class="short">Fires when the configuration is changed</div>
\r
1183 <div class="long">
\r
1184 Fires when the configuration is changed <div class="mdetail-params">
\r
1185 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1186 <ul><li><code>this</code> : ColumnModel<div class="sub-desc"></div></li> </ul>
\r
1191 <td class="msource">ColumnModel</td>
\r
1193 <tr class="event-row expandable">
\r
1194 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1196 <a id="Ext.grid.ColumnModel-headerchange"></a>
\r
1197 <b>headerchange</b> : ( <code>ColumnModel this</code>, <code>Number columnIndex</code>, <code>String newText</code> ) <div class="mdesc">
\r
1198 <div class="short">Fires when the text of a header changes.</div>
\r
1199 <div class="long">
\r
1200 Fires when the text of a header changes. <div class="mdetail-params">
\r
1201 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1202 <ul><li><code>this</code> : ColumnModel<div class="sub-desc"></div></li><li><code>columnIndex</code> : Number<div class="sub-desc">The column index</div></li><li><code>newText</code> : String<div class="sub-desc">The new header text</div></li> </ul>
\r
1207 <td class="msource">ColumnModel</td>
\r
1209 <tr class="event-row alt expandable">
\r
1210 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1212 <a id="Ext.grid.ColumnModel-hiddenchange"></a>
\r
1213 <b>hiddenchange</b> : ( <code>ColumnModel this</code>, <code>Number columnIndex</code>, <code>Boolean hidden</code> ) <div class="mdesc">
\r
1214 <div class="short">Fires when a column is hidden or "unhidden".</div>
\r
1215 <div class="long">
\r
1216 Fires when a column is hidden or "unhidden". <div class="mdetail-params">
\r
1217 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1218 <ul><li><code>this</code> : ColumnModel<div class="sub-desc"></div></li><li><code>columnIndex</code> : Number<div class="sub-desc">The column index</div></li><li><code>hidden</code> : Boolean<div class="sub-desc">true if hidden, false otherwise</div></li> </ul>
\r
1223 <td class="msource">ColumnModel</td>
\r
1225 <tr class="event-row expandable">
\r
1226 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1228 <a id="Ext.grid.ColumnModel-widthchange"></a>
\r
1229 <b>widthchange</b> : ( <code>ColumnModel this</code>, <code>Number columnIndex</code>, <code>Number newWidth</code> ) <div class="mdesc">
\r
1230 <div class="short">Fires when the width of a column changes.</div>
\r
1231 <div class="long">
\r
1232 Fires when the width of a column changes. <div class="mdetail-params">
\r
1233 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1234 <ul><li><code>this</code> : ColumnModel<div class="sub-desc"></div></li><li><code>columnIndex</code> : Number<div class="sub-desc">The column index</div></li><li><code>newWidth</code> : Number<div class="sub-desc">The new width</div></li> </ul>
\r
1239 <td class="msource">ColumnModel</td>
\r