1 <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.grid.ActionColumn-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.grid.ActionColumn-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.grid.ActionColumn-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.grid.ActionColumn-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.grid.ActionColumn"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.grid.Column.html" ext:member="" ext:cls="Ext.grid.Column">Column</a>
2 <img src="resources/elbow-end.gif">ActionColumn</pre></div><h1>Class <a href="source/Column.html#cls-Ext.grid.ActionColumn">Ext.grid.ActionColumn</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"><a href="source/Column.html#cls-Ext.grid.ActionColumn">Column.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Column.html#cls-Ext.grid.ActionColumn">ActionColumn</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.grid.Column.html" ext:cls="Ext.grid.Column" ext:member="">Column</a></td></tr></table><div class="description"><p>A Grid column type which renders an icon, or a series of icons in a grid cell, and offers a scoped click
3 handler for each icon. Example usage:</p>
4 <pre><code><b>new</b> Ext.grid.GridPanel({
8 xtype: <em>'actioncolumn'</em>,
12 icon : <em>'sell.gif'</em>, <i>// Use a URL <b>in</b> the icon config</i>
13 tooltip: <em>'Sell stock'</em>,
14 handler: <b>function</b>(grid, rowIndex, colIndex) {
15 <b>var</b> rec = store.getAt(rowIndex);
16 alert(<em>"Sell "</em> + rec.get(<em>'company'</em>));
20 getClass: <b>function</b>(v, meta, rec) { <i>// Or <b>return</b> a class from a <b>function</b></i>
21 <b>if</b> (rec.get(<em>'change'</em>) < 0) {
22 this.items[1].tooltip = <em>'Do not buy!'</em>;
23 <b>return</b> <em>'alert-col'</em>;
25 this.items[1].tooltip = <em>'Buy stock'</em>;
26 <b>return</b> <em>'buy-col'</em>;
29 handler: <b>function</b>(grid, rowIndex, colIndex) {
30 <b>var</b> rec = store.getAt(rowIndex);
31 alert(<em>"Buy "</em> + rec.get(<em>'company'</em>));
36 <i>//any other columns here</i>
40 <p>The action column can be at any index in the columns array, and a grid can have any number of
41 action columns. </p></div><div class="hr"></div><a id="Ext.grid.ActionColumn-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-align"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-align">align</a></b> : String<div class="mdesc">Optional. Set the CSS text-align property of the column. Defaults to undefined.</div></td><td class="msource"><a href="output/Ext.grid.Column.html#align" ext:member="#align" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-altText"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-altText">altText</a></b> : String<div class="mdesc">The alt text to use for the image element. Defaults to <tt>''</tt>.</div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-css"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-css">css</a></b> : String<div class="mdesc"><div class="short">Optional. An inline style definition string which is applied to all table cells in the column
42 (excluding headers). De...</div><div class="long">Optional. An inline style definition string which is applied to all table cells in the column
43 (excluding headers). Defaults to undefined.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#css" ext:member="#css" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-dataIndex"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-dataIndex">dataIndex</a></b> : String<div class="mdesc"><div class="short">Required. The name of the field in the
44 grid's Ext.data.Store's Ext.data.Record definition from
45 which to draw the colu...</div><div class="long"><p><b>Required</b>. The name of the field in the
46 grid's <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a>'s <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> definition from
47 which to draw the column's value.</p></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#dataIndex" ext:member="#dataIndex" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-editable"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-editable">editable</a></b> : Boolean<div class="mdesc"><div class="short">Optional. Defaults to true, enabling the configured
48 editor. Set to false to initially disable editing on this column...</div><div class="long">Optional. Defaults to <tt>true</tt>, enabling the configured
49 <tt><a href="output/Ext.grid.Column.html#Ext.grid.Column-editor" ext:member="editor" ext:cls="Ext.grid.Column">editor</a></tt>. Set to <tt>false</tt> to initially disable editing on this column.
50 The initial configuration may be dynamically altered using
51 <a href="output/Ext.grid.ColumnModel.html" ext:cls="Ext.grid.ColumnModel">Ext.grid.ColumnModel</a>.<a href="output/Ext.grid.ColumnModel.html#Ext.grid.ColumnModel-setEditable" ext:member="setEditable" ext:cls="Ext.grid.ColumnModel">setEditable()</a>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#editable" ext:member="#editable" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-editor"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-editor">editor</a></b> : Ext.form.Field<div class="mdesc"><div class="short">Optional. The Ext.form.Field to use when editing values in this column
52 if editing is supported by the grid. See edita...</div><div class="long">Optional. The <a href="output/Ext.form.Field.html" ext:cls="Ext.form.Field">Ext.form.Field</a> to use when editing values in this column
53 if editing is supported by the grid. See <tt><a href="output/Ext.grid.Column.html#Ext.grid.Column-editable" ext:member="editable" ext:cls="Ext.grid.Column">editable</a></tt> also.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#editor" ext:member="#editor" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-emptyGroupText"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-emptyGroupText">emptyGroupText</a></b> : String<div class="mdesc"><div class="short">Optional. If the grid is being rendered by an Ext.grid.GroupingView, this option
54 may be used to specify the text to d...</div><div class="long">Optional. If the grid is being rendered by an <a href="output/Ext.grid.GroupingView.html" ext:cls="Ext.grid.GroupingView">Ext.grid.GroupingView</a>, this option
55 may be used to specify the text to display when there is an empty group value. Defaults to the
56 <a href="output/Ext.grid.GroupingView.html" ext:cls="Ext.grid.GroupingView">Ext.grid.GroupingView</a>.<a href="output/Ext.grid.GroupingView.html#Ext.grid.GroupingView-emptyGroupText" ext:member="emptyGroupText" ext:cls="Ext.grid.GroupingView">emptyGroupText</a>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#emptyGroupText" ext:member="#emptyGroupText" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-fixed"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-fixed">fixed</a></b> : Boolean<div class="mdesc">Optional. <tt>true</tt> if the column width cannot be changed. Defaults to <tt>false</tt>.</div></td><td class="msource"><a href="output/Ext.grid.Column.html#fixed" ext:member="#fixed" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-getClass"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-getClass">getClass</a></b> : Function<div class="mdesc"><div class="short">A function which returns the CSS class to apply to the icon image.
57 The function is passed the following parameters:<d...</div><div class="long">A function which returns the CSS class to apply to the icon image.
58 The function is passed the following parameters:<div class="mdetail-params"><ul>
59 <li><b>v</b> : Object<p class="sub-desc">The value of the column's configured field (if any).</p></li>
60 <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
61 <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
62 <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
63 (e.g. 'style="color:red;"').</p></li>
65 <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data.</p></li>
66 <li><b>rowIndex</b> : Number<p class="sub-desc">The row index..</p></li>
67 <li><b>colIndex</b> : Number<p class="sub-desc">The column index.</p></li>
68 <li><b>store</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
69 </ul></div></div></div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-groupName"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-groupName">groupName</a></b> : String<div class="mdesc"><div class="short">Optional. If the grid is being rendered by an Ext.grid.GroupingView, this option
70 may be used to specify the text with...</div><div class="long">Optional. If the grid is being rendered by an <a href="output/Ext.grid.GroupingView.html" ext:cls="Ext.grid.GroupingView">Ext.grid.GroupingView</a>, this option
71 may be used to specify the text with which to prefix the group field value in the group header line.
72 See also <a href="output/Ext.grid.Column.html#Ext.grid.Column-groupRenderer" ext:member="groupRenderer" ext:cls="Ext.grid.Column">groupRenderer</a> and
73 <a href="output/Ext.grid.GroupingView.html" ext:cls="Ext.grid.GroupingView">Ext.grid.GroupingView</a>.<a href="output/Ext.grid.GroupingView.html#Ext.grid.GroupingView-showGroupName" ext:member="showGroupName" ext:cls="Ext.grid.GroupingView">showGroupName</a>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#groupName" ext:member="#groupName" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-groupRenderer"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-groupRenderer">groupRenderer</a></b> : Function<div class="mdesc"><div class="short">Optional. If the grid is being rendered by an Ext.grid.GroupingView, this option
74 may be used to specify the function ...</div><div class="long"><p>Optional. If the grid is being rendered by an <a href="output/Ext.grid.GroupingView.html" ext:cls="Ext.grid.GroupingView">Ext.grid.GroupingView</a>, this option
75 may be used to specify the function used to format the grouping field value for display in the group
76 <a href="output/Ext.grid.Column.html#Ext.grid.Column-groupName" ext:member="groupName" ext:cls="Ext.grid.Column">header</a>. If a <tt><b>groupRenderer</b></tt> is not specified, the configured
77 <tt><b><a href="output/Ext.grid.Column.html#Ext.grid.Column-renderer" ext:member="renderer" ext:cls="Ext.grid.Column">renderer</a></b></tt> will be called; if a <tt><b><a href="output/Ext.grid.Column.html#Ext.grid.Column-renderer" ext:member="renderer" ext:cls="Ext.grid.Column">renderer</a></b></tt> is also not specified
78 the new value of the group field will be used.</p>
79 <p>The called function (either the <tt><b>groupRenderer</b></tt> or <tt><b><a href="output/Ext.grid.Column.html#Ext.grid.Column-renderer" ext:member="renderer" ext:cls="Ext.grid.Column">renderer</a></b></tt>) will be
80 passed the following parameters:
81 <div class="mdetail-params"><ul>
82 <li><b>v</b> : Object<p class="sub-desc">The new value of the group field.</p></li>
83 <li><b>unused</b> : undefined<p class="sub-desc">Unused parameter.</p></li>
84 <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data
85 for the row which caused group change.</p></li>
86 <li><b>rowIndex</b> : Number<p class="sub-desc">The row index of the Record which caused group change.</p></li>
87 <li><b>colIndex</b> : Number<p class="sub-desc">The column index of the group field.</p></li>
88 <li><b>ds</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
90 <p>The function should return a string value.</p></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#groupRenderer" ext:member="#groupRenderer" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-groupable"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-groupable">groupable</a></b> : Boolean<div class="mdesc"><div class="short">Optional. If the grid is being rendered by an Ext.grid.GroupingView, this option
91 may be used to disable the header me...</div><div class="long">Optional. If the grid is being rendered by an <a href="output/Ext.grid.GroupingView.html" ext:cls="Ext.grid.GroupingView">Ext.grid.GroupingView</a>, this option
92 may be used to disable the header menu item to group by the column selected. Defaults to <tt>true</tt>,
93 which enables the header menu group option. Set to <tt>false</tt> to disable (but still show) the
94 group option in the header menu for the column. See also <code><a href="output/Ext.grid.Column.html#Ext.grid.Column-groupName" ext:member="groupName" ext:cls="Ext.grid.Column">groupName</a></code>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#groupable" ext:member="#groupable" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-handler"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-handler">handler</a></b> : Function<div class="mdesc"><div class="short">A function called when the icon is clicked.
95 The handler is passed the following parameters:<div class="mdetail-params...</div><div class="long">A function called when the icon is clicked.
96 The handler is passed the following parameters:<div class="mdetail-params"><ul>
97 <li><code>grid</code> : GridPanel<div class="sub-desc">The owning GridPanel.</div></li>
98 <li><code>rowIndex</code> : Number<div class="sub-desc">The row index clicked on.</div></li>
99 <li><code>colIndex</code> : Number<div class="sub-desc">The column index clicked on.</div></li>
100 <li><code>item</code> : Object<div class="sub-desc">The clicked item (or this Column if multiple
101 <a href="output/Ext.grid.ActionColumn.html#Ext.grid.ActionColumn-items" ext:member="items" ext:cls="Ext.grid.ActionColumn">items</a> were not configured).</div></li>
102 <li><code>e</code> : Event<div class="sub-desc">The click event.</div></li>
103 </ul></div></div></div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-header"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-header">header</a></b> : String<div class="mdesc"><div class="short">Optional. The header text to be used as innerHTML
104 (html tags are accepted) to display in the Grid view. Note: to
105 hav...</div><div class="long">Optional. The header text to be used as innerHTML
106 (html tags are accepted) to display in the Grid view. <b>Note</b>: to
107 have a clickable header with no text displayed use <tt>'&#160;'</tt>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#header" ext:member="#header" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-hidden"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-hidden">hidden</a></b> : Boolean<div class="mdesc"><div class="short">Optional. true to initially hide this column. Defaults to false.
108 A hidden column may be shown via the header row menu...</div><div class="long">Optional. <tt>true</tt> to initially hide this column. Defaults to <tt>false</tt>.
109 A hidden column <a href="output/Ext.grid.GridPanel.html#Ext.grid.GridPanel-enableColumnHide" ext:member="enableColumnHide" ext:cls="Ext.grid.GridPanel">may be shown via the header row menu</a>.
110 If a column is never to be shown, simply do not include this column in the Column Model at all.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#hidden" ext:member="#hidden" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-hideable"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-hideable">hideable</a></b> : Boolean<div class="mdesc"><div class="short">Optional. Specify as false to prevent the user from hiding this column
111 (defaults to true). To disallow column hiding...</div><div class="long">Optional. Specify as <tt>false</tt> to prevent the user from hiding this column
112 (defaults to true). To disallow column hiding globally for all columns in the grid, use
113 <a href="output/Ext.grid.GridPanel.html#Ext.grid.GridPanel-enableColumnHide" ext:member="enableColumnHide" ext:cls="Ext.grid.GridPanel">Ext.grid.GridPanel.enableColumnHide</a> instead.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#hideable" ext:member="#hideable" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-icon"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-icon">icon</a></b> : String<div class="mdesc">The URL of an image to display as the clickable element in the column.
114 Optional - defaults to <code><a href="output/Ext.html#Ext-BLANK_IMAGE_URL" ext:member="BLANK_IMAGE_URL" ext:cls="Ext">Ext.BLANK_IMAGE_URL</a></code>.</div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-iconCls"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-iconCls">iconCls</a></b> : String<div class="mdesc"><div class="short">A CSS class to apply to the icon image. To determine the class dynamically, configure the Column with a getClass func...</div><div class="long">A CSS class to apply to the icon image. To determine the class dynamically, configure the Column with a <code><a href="output/Ext.grid.ActionColumn.html#Ext.grid.ActionColumn-getClass" ext:member="getClass" ext:cls="Ext.grid.ActionColumn">getClass</a></code> function.</div></div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-id"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-id">id</a></b> : String<div class="mdesc"><div class="short">Optional. A name which identifies this column (defaults to the column's initial
115 ordinal position.) The id is used to ...</div><div class="long">Optional. A name which identifies this column (defaults to the column's initial
116 ordinal position.) The <tt>id</tt> is used to create a CSS <b>class</b> name which is applied to all
117 table cells (including headers) in that column (in this context the <tt>id</tt> does not need to be
118 unique). The class name takes the form of <pre>x-grid3-td-<b>id</b></pre>
119 Header cells will also receive this class name, but will also have the class <pre>x-grid3-hd</pre>
120 So, to target header cells, use CSS selectors such as:<pre>.x-grid3-hd-row .x-grid3-td-<b>id</b></pre>
121 The <a href="output/Ext.grid.GridPanel.html#Ext.grid.GridPanel-autoExpandColumn" ext:member="autoExpandColumn" ext:cls="Ext.grid.GridPanel">Ext.grid.GridPanel.autoExpandColumn</a> grid config option references the column via this
122 unique identifier.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#id" ext:member="#id" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-items"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-items">items</a></b> : Array<div class="mdesc"><div class="short">An Array which may contain multiple icon definitions, each element of which may contain:
123 <div class="mdetail-params">...</div><div class="long">An Array which may contain multiple icon definitions, each element of which may contain:
124 <div class="mdetail-params"><ul>
125 <li><code>icon</code> : String<div class="sub-desc">The url of an image to display as the clickable element
126 in the column.</div></li>
127 <li><code>iconCls</code> : String<div class="sub-desc">A CSS class to apply to the icon image.
128 To determine the class dynamically, configure the item with a <code>getClass</code> function.</div></li>
129 <li><code>getClass</code> : Function<div class="sub-desc">A function which returns the CSS class to apply to the icon image.
130 The function is passed the following parameters:<ul>
131 <li><b>v</b> : Object<p class="sub-desc">The value of the column's configured field (if any).</p></li>
132 <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
133 <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
134 <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
135 (e.g. 'style="color:red;"').</p></li>
137 <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data.</p></li>
138 <li><b>rowIndex</b> : Number<p class="sub-desc">The row index..</p></li>
139 <li><b>colIndex</b> : Number<p class="sub-desc">The column index.</p></li>
140 <li><b>store</b> : Ext.data.Store<p class="sub-desc">The Store which is providing the data Model.</p></li>
142 <li><code>handler</code> : Function<div class="sub-desc">A function called when the icon is clicked.</div></li>
143 <li><code>scope</code> : Scope<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the
144 <code>handler</code> and <code>getClass</code> functions are executed. Fallback defaults are this Column's
145 configured scope, then this Column.</div></li>
146 <li><code>tooltip</code> : String<div class="sub-desc">A tooltip message to be displayed on hover.
147 <a href="output/Ext.QuickTips.html#Ext.QuickTips-init" ext:member="init" ext:cls="Ext.QuickTips">Ext.QuickTips</a> must have been initialized.</div></li>
148 </ul></div></div></div></td><td class="msource">ActionColumn</td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-menuDisabled"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-menuDisabled">menuDisabled</a></b> : Boolean<div class="mdesc">Optional. <tt>true</tt> to disable the column menu. Defaults to <tt>false</tt>.</div></td><td class="msource"><a href="output/Ext.grid.Column.html#menuDisabled" ext:member="#menuDisabled" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-renderer"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-renderer">renderer</a></b> : Mixed<div class="mdesc"><div class="short">For an alternative to specifying a renderer see xtype
149 Optional. A renderer is an 'interceptor' method which can be us...</div><div class="long"><p>For an alternative to specifying a renderer see <code><a href="output/Ext.grid.Column.html#Ext.grid.Column-xtype" ext:member="xtype" ext:cls="Ext.grid.Column">xtype</a></code></p>
150 <p>Optional. A renderer is an 'interceptor' method which can be used transform data (value,
151 appearance, etc.) before it is rendered). This may be specified in either of three ways:
152 <div class="mdetail-params"><ul>
153 <li>A renderer function used to return HTML markup for a cell given the cell's data value.</li>
154 <li>A string which references a property name of the <a href="output/Ext.util.Format.html" ext:cls="Ext.util.Format">Ext.util.Format</a> class which
155 provides a renderer function.</li>
156 <li>An object specifying both the renderer function, and its execution scope (<tt><b>this</b></tt>
157 reference) e.g.:<pre style="margin-left:1.2em"><code>{
158 fn: this.gridRenderer,
160 }</code></pre></li></ul></div>
161 If not specified, the default renderer uses the raw data value.</p>
162 <p>For information about the renderer function (passed parameters, etc.), see
163 <a href="output/Ext.grid.ColumnModel.html#Ext.grid.ColumnModel-setRenderer" ext:member="setRenderer" ext:cls="Ext.grid.ColumnModel">Ext.grid.ColumnModel.setRenderer</a>. An example of specifying renderer function inline:</p><pre><code><b>var</b> companyColumn = {
164 header: <em>'Company Name'</em>,
165 dataIndex: <em>'company'</em>,
166 renderer: <b>function</b>(value, metaData, record, rowIndex, colIndex, store) {
167 <i>// provide the logic depending on business rules</i>
168 <i>// name of your own choosing to manipulate the cell depending upon</i>
169 <i>// the data <b>in</b> the underlying Record object.</i>
170 <b>if</b> (value == <em>'whatever'</em>) {
171 <i>//metaData.css : String : A CSS class name to add to the TD element of the cell.</i>
172 <i>//metaData.attr : String : An html attribute definition string to apply to</i>
173 <i>// the data container element within the table</i>
174 <i>// cell (e.g. <em>'style=<em>"color:red;"</em>'</em>).</i>
175 metaData.css = <em>'name-of-css-class-you-will-define'</em>;
180 See also <a href="output/Ext.grid.Column.html#Ext.grid.Column-scope" ext:member="scope" ext:cls="Ext.grid.Column">scope</a>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#renderer" ext:member="#renderer" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-resizable"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-resizable">resizable</a></b> : Boolean<div class="mdesc">Optional. <tt>false</tt> to disable column resizing. Defaults to <tt>true</tt>.</div></td><td class="msource"><a href="output/Ext.grid.Column.html#resizable" ext:member="#resizable" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-scope"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-scope">scope</a></b> : Object<div class="mdesc">The scope (<tt><b>this</b></tt> reference) in which the <code><a href="output/Ext.grid.ActionColumn.html#Ext.grid.ActionColumn-handler" ext:member="handler" ext:cls="Ext.grid.ActionColumn">handler</a></code>
181 and <code><a href="output/Ext.grid.ActionColumn.html#Ext.grid.ActionColumn-getClass" ext:member="getClass" ext:cls="Ext.grid.ActionColumn">getClass</a></code> fuctions are executed. Defaults to this Column.</div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-sortable"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-sortable">sortable</a></b> : Boolean<div class="mdesc"><div class="short">Optional. true if sorting is to be allowed on this column.
182 Defaults to the value of the Ext.grid.ColumnModel.defaultS...</div><div class="long">Optional. <tt>true</tt> if sorting is to be allowed on this column.
183 Defaults to the value of the <code><a href="output/Ext.grid.ColumnModel.html#Ext.grid.ColumnModel-defaultSortable" ext:member="defaultSortable" ext:cls="Ext.grid.ColumnModel">Ext.grid.ColumnModel.defaultSortable</a></code> property.
184 Whether local/remote sorting is used is specified in <code><a href="output/Ext.data.Store.html#Ext.data.Store-remoteSort" ext:member="remoteSort" ext:cls="Ext.data.Store">Ext.data.Store.remoteSort</a></code>.</div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#sortable" ext:member="#sortable" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-stopSelection"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-stopSelection">stopSelection</a></b> : Boolean<div class="mdesc">Defaults to <code>true</code>. Prevent grid <i>row</i> selection upon mousedown.</div></td><td class="msource">ActionColumn</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.ActionColumn-tooltip"></a><b><a href="source/Column.html#cfg-Ext.grid.ActionColumn-tooltip">tooltip</a></b> : String<div class="mdesc">A tooltip message to be displayed on hover. <a href="output/Ext.QuickTips.html#Ext.QuickTips-init" ext:member="init" ext:cls="Ext.QuickTips">Ext.QuickTips</a> must have
185 been initialized.</div></td><td class="msource">ActionColumn</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-width"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-width">width</a></b> : Number<div class="mdesc"><div class="short">Optional. The initial width in pixels of the column.
186 The width of each column can also be affected if any of the foll...</div><div class="long">Optional. The initial width in pixels of the column.
187 The width of each column can also be affected if any of the following are configured:
188 <div class="mdetail-params"><ul>
189 <li><a href="output/Ext.grid.GridPanel.html" ext:cls="Ext.grid.GridPanel">Ext.grid.GridPanel</a>.<tt><a href="output/Ext.grid.GridPanel.html#Ext.grid.GridPanel-autoExpandColumn" ext:member="autoExpandColumn" ext:cls="Ext.grid.GridPanel">autoExpandColumn</a></tt></li>
190 <li><a href="output/Ext.grid.GridView.html" ext:cls="Ext.grid.GridView">Ext.grid.GridView</a>.<tt><a href="output/Ext.grid.GridView.html#Ext.grid.GridView-forceFit" ext:member="forceFit" ext:cls="Ext.grid.GridView">forceFit</a></tt>
191 <div class="sub-desc">
192 <p>By specifying <tt>forceFit:true</tt>, <a href="output/Ext.grid.Column.html#Ext.grid.Column-fixed" ext:member="fixed" ext:cls="Ext.grid.Column">non-fixed width</a> columns will be
193 re-proportioned (based on the relative initial widths) to fill the width of the grid so
194 that no horizontal scrollbar is shown.</p>
196 <li><a href="output/Ext.grid.GridView.html" ext:cls="Ext.grid.GridView">Ext.grid.GridView</a>.<tt><a href="output/Ext.grid.GridView.html#Ext.grid.GridView-autoFill" ext:member="autoFill" ext:cls="Ext.grid.GridView">autoFill</a></tt></li>
197 <li><a href="output/Ext.grid.GridPanel.html" ext:cls="Ext.grid.GridPanel">Ext.grid.GridPanel</a>.<tt><a href="output/Ext.grid.GridPanel.html#Ext.grid.GridPanel-minColumnWidth" ext:member="minColumnWidth" ext:cls="Ext.grid.GridPanel">minColumnWidth</a></tt></li>
198 <br><p><b>Note</b>: when the width of each column is determined, a space on the right side
199 is reserved for the vertical scrollbar. The
200 <a href="output/Ext.grid.GridView.html" ext:cls="Ext.grid.GridView">Ext.grid.GridView</a>.<tt><a href="output/Ext.grid.GridView.html#Ext.grid.GridView-scrollOffset" ext:member="scrollOffset" ext:cls="Ext.grid.GridView">scrollOffset</a></tt>
201 can be modified to reduce or eliminate the reserved offset.</p></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#width" ext:member="#width" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-xtype"></a><b><a href="source/Column.html#cfg-Ext.grid.Column-xtype">xtype</a></b> : String<div class="mdesc"><div class="short">Optional. A String which references a predefined Ext.grid.Column subclass
202 type which is preconfigured with an appropr...</div><div class="long">Optional. A String which references a predefined <a href="output/Ext.grid.Column.html" ext:cls="Ext.grid.Column">Ext.grid.Column</a> subclass
203 type which is preconfigured with an appropriate <code><a href="output/Ext.grid.Column.html#Ext.grid.Column-renderer" ext:member="renderer" ext:cls="Ext.grid.Column">renderer</a></code> to be easily
204 configured into a ColumnModel. The predefined <a href="output/Ext.grid.Column.html" ext:cls="Ext.grid.Column">Ext.grid.Column</a> subclass types are:
205 <div class="mdetail-params"><ul>
206 <li><b><tt>gridcolumn</tt></b> : <a href="output/Ext.grid.Column.html" ext:cls="Ext.grid.Column">Ext.grid.Column</a> (<b>Default</b>)<p class="sub-desc"></p></li>
207 <li><b><tt>booleancolumn</tt></b> : <a href="output/Ext.grid.BooleanColumn.html" ext:cls="Ext.grid.BooleanColumn">Ext.grid.BooleanColumn</a><p class="sub-desc"></p></li>
208 <li><b><tt>numbercolumn</tt></b> : <a href="output/Ext.grid.NumberColumn.html" ext:cls="Ext.grid.NumberColumn">Ext.grid.NumberColumn</a><p class="sub-desc"></p></li>
209 <li><b><tt>datecolumn</tt></b> : <a href="output/Ext.grid.DateColumn.html" ext:cls="Ext.grid.DateColumn">Ext.grid.DateColumn</a><p class="sub-desc"></p></li>
210 <li><b><tt>templatecolumn</tt></b> : <a href="output/Ext.grid.TemplateColumn.html" ext:cls="Ext.grid.TemplateColumn">Ext.grid.TemplateColumn</a><p class="sub-desc"></p></li>
212 <p>Configuration properties for the specified <code>xtype</code> may be specified with
213 the Column configuration properties, for example:</p>
214 <pre><code><b>var</b> grid = <b>new</b> Ext.grid.GridPanel({
217 header: <em>'Last Updated'</em>,
218 dataIndex: <em>'lastChange'</em>,
221 <i>//renderer: Ext.util.Format.dateRenderer(<em>'m/d/Y'</em>),</i>
222 xtype: <em>'datecolumn'</em>, <i>// use xtype instead of renderer</i>
223 format: <em>'M/d/Y'</em> <i>// configuration property <b>for</b> <a href="output/Ext.grid.DateColumn.html" ext:cls="Ext.grid.DateColumn">Ext.grid.DateColumn</a></i>
227 });</code></pre></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#xtype" ext:member="#xtype" ext:cls="Ext.grid.Column">Column</a></td></tr></tbody></table><a id="Ext.grid.ActionColumn-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-renderer"></a><b><a href="source/Column.html#prop-Ext.grid.Column-renderer">renderer</a></b> : Function<div class="mdesc"><div class="short">Optional. A function which returns displayable data when passed the following parameters:
228 <div class="mdetail-params"...</div><div class="long">Optional. A function which returns displayable data when passed the following parameters:
229 <div class="mdetail-params"><ul>
230 <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
231 <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
232 <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
233 <li><b>attr</b> : String<p class="sub-desc">An HTML attribute definition string to apply to the data container
234 element <i>within</i> the table cell (e.g. 'style="color:red;"').</p></li></ul></p></li>
235 <li><b>record</b> : Ext.data.record<p class="sub-desc">The <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> from which the data was
237 <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
238 <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
239 <li><b>store</b> : Ext.data.Store<p class="sub-desc">The <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> object from which the Record
240 was extracted.</p></li>
241 </ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#renderer" ext:member="#renderer" ext:cls="Ext.grid.Column">Column</a></td></tr></tbody></table><a id="Ext.grid.ActionColumn-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-getCellEditor"></a><b><a href="source/Column.html#method-Ext.grid.Column-getCellEditor">getCellEditor</a></b>( <code>Number rowIndex</code> )
243 Ext.Editor<div class="mdesc"><div class="short">Returns the editor defined for this column that was created to wrap the Field
244 used to edit the cell.</div><div class="long">Returns the <a href="output/Ext.Editor.html" ext:cls="Ext.Editor">editor</a> defined for this column that was created to wrap the <a href="output/Ext.form.Field.html" ext:cls="Ext.form.Field">Field</a>
245 used to edit the cell.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>rowIndex</code> : Number<div class="sub-desc">The row index</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.Editor</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#getCellEditor" ext:member="#getCellEditor" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-setEditor"></a><b><a href="source/Column.html#method-Ext.grid.Column-setEditor">setEditor</a></b>( <code>Ext.Editor/Ext.form.Field editor</code> )
247 void<div class="mdesc"><div class="short">Sets a new editor for this column.</div><div class="long">Sets a new editor for this column.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>editor</code> : Ext.Editor/Ext.form.Field<div class="sub-desc">The editor to set</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#setEditor" ext:member="#setEditor" ext:cls="Ext.grid.Column">Column</a></td></tr></tbody></table><a id="Ext.grid.ActionColumn-events"></a><h2>Public Events</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Event</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-click"></a><b><a href="source/Column.html#event-Ext.grid.Column-click">click</a></b> :
248 ( <code>Column this</code>, <code>Grid The</code>, <code>Number rowIndex</code>, <code>Ext.EventObject e</code> )
249 <div class="mdesc"><div class="short">Fires when this Column is clicked.</div><div class="long">Fires when this Column is clicked.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Column<div class="sub-desc"></div></li><li><code>The</code> : Grid<div class="sub-desc">owning GridPanel</div></li><li><code>rowIndex</code> : Number<div class="sub-desc"></div></li><li><code>e</code> : Ext.EventObject<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#click" ext:member="#click" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-contextmenu"></a><b><a href="source/Column.html#event-Ext.grid.Column-contextmenu">contextmenu</a></b> :
250 ( <code>Column this</code>, <code>Grid The</code>, <code>Number rowIndex</code>, <code>Ext.EventObject e</code> )
251 <div class="mdesc"><div class="short">Fires when this Column is right clicked.</div><div class="long">Fires when this Column is right clicked.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Column<div class="sub-desc"></div></li><li><code>The</code> : Grid<div class="sub-desc">owning GridPanel</div></li><li><code>rowIndex</code> : Number<div class="sub-desc"></div></li><li><code>e</code> : Ext.EventObject<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#contextmenu" ext:member="#contextmenu" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-dblclick"></a><b><a href="source/Column.html#event-Ext.grid.Column-dblclick">dblclick</a></b> :
252 ( <code>Column this</code>, <code>Grid The</code>, <code>Number rowIndex</code>, <code>Ext.EventObject e</code> )
253 <div class="mdesc"><div class="short">Fires when this Column is double clicked.</div><div class="long">Fires when this Column is double clicked.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Column<div class="sub-desc"></div></li><li><code>The</code> : Grid<div class="sub-desc">owning GridPanel</div></li><li><code>rowIndex</code> : Number<div class="sub-desc"></div></li><li><code>e</code> : Ext.EventObject<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#dblclick" ext:member="#dblclick" ext:cls="Ext.grid.Column">Column</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.grid.Column-mousedown"></a><b><a href="source/Column.html#event-Ext.grid.Column-mousedown">mousedown</a></b> :
254 ( <code>Column this</code>, <code>Grid The</code>, <code>Number rowIndex</code>, <code>Ext.EventObject e</code> )
255 <div class="mdesc"><div class="short">Fires when this Column receives a mousedown event.</div><div class="long">Fires when this Column receives a mousedown event.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Column<div class="sub-desc"></div></li><li><code>The</code> : Grid<div class="sub-desc">owning GridPanel</div></li><li><code>rowIndex</code> : Number<div class="sub-desc"></div></li><li><code>e</code> : Ext.EventObject<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.grid.Column.html#mousedown" ext:member="#mousedown" ext:cls="Ext.grid.Column">Column</a></td></tr></tbody></table></div>