57045b0cd944e4d25c3e38596e506a42d1536528.svn-base 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  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>
  8. </div>
  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>
  19. </table>
  20. <div class="description">
  21. This is the default implementation of a ColumnModel used by the Grid. This class is initialized
  22. with an Array of column config objects.
  23. <br><br>
  24. 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>
  25. field the column draws its data from, an otional rendering function to provide customized
  26. data formatting, and the ability to apply a CSS class to all cells in a column through its
  27. <a ext:cls="Ext.grid.ColumnModel" ext:member="id" href="output/Ext.grid.ColumnModel.html#id">id</a> config option.<br>
  28. <br>Usage:<br>
  29. <pre><code>var colModel = <b>new</b> Ext.grid.ColumnModel([
  30. {header: <em>"Ticker"</em>, width: 60, sortable: true},
  31. {header: <em>"Company Name"</em>, width: 150, sortable: true},
  32. {header: <em>"Market Cap."</em>, width: 100, sortable: true},
  33. {header: <em>"$ Sales"</em>, width: 100, sortable: true, renderer: money},
  34. {header: <em>"Employees"</em>, width: 100, sortable: true, resizable: false}
  35. ]);</code></pre>
  36. <p>
  37. The config options listed for this class are options which may appear in each
  38. individual column definition. </div>
  39. <div class="hr"></div>
  40. <a id="Ext.grid.ColumnModel-configs"></a>
  41. <h2>Config Options</h2>
  42. <table cellspacing="0" class="member-table">
  43. <tr>
  44. <th class="sig-header" colspan="2">Config Options</th>
  45. <th class="msource-header">Defined By</th>
  46. </tr>
  47. <tr class="config-row">
  48. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  49. <td class="sig">
  50. <a id="Ext.grid.ColumnModel-align"></a>
  51. <b>align</b> : String <div class="mdesc">
  52. (optional) Set the CSS text-align property of the column. Defaults to undefined. </div>
  53. </td>
  54. <td class="msource">ColumnModel</td>
  55. </tr>
  56. <tr class="config-row alt expandable">
  57. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  58. <td class="sig">
  59. <a id="Ext.grid.ColumnModel-dataIndex"></a>
  60. <b>dataIndex</b> : String <div class="mdesc">
  61. <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>
  62. <div class="long">
  63. (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>
  64. </div>
  65. </td>
  66. <td class="msource">ColumnModel</td>
  67. </tr>
  68. <tr class="config-row">
  69. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  70. <td class="sig">
  71. <a id="Ext.grid.ColumnModel-editor"></a>
  72. <b>editor</b> : Ext.form.Field <div class="mdesc">
  73. (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>
  74. </td>
  75. <td class="msource">ColumnModel</td>
  76. </tr>
  77. <tr class="config-row alt">
  78. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  79. <td class="sig">
  80. <a id="Ext.grid.ColumnModel-fixed"></a>
  81. <b>fixed</b> : Boolean <div class="mdesc">
  82. (optional) True if the column width cannot be changed. Defaults to false. </div>
  83. </td>
  84. <td class="msource">ColumnModel</td>
  85. </tr>
  86. <tr class="config-row">
  87. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  88. <td class="sig">
  89. <a id="Ext.grid.ColumnModel-header"></a>
  90. <b>header</b> : String <div class="mdesc">
  91. The header text to display in the Grid view. </div>
  92. </td>
  93. <td class="msource">ColumnModel</td>
  94. </tr>
  95. <tr class="config-row alt">
  96. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  97. <td class="sig">
  98. <a id="Ext.grid.ColumnModel-hidden"></a>
  99. <b>hidden</b> : Boolean <div class="mdesc">
  100. (optional) True to hide the column. Defaults to false. </div>
  101. </td>
  102. <td class="msource">ColumnModel</td>
  103. </tr>
  104. <tr class="config-row">
  105. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  106. <td class="sig">
  107. <a id="Ext.grid.ColumnModel-hideable"></a>
  108. <b>hideable</b> : Boolean <div class="mdesc">
  109. (optional) Specify as <tt>false</tt> to prevent the user from hiding this column. Defaults to true. </div>
  110. </td>
  111. <td class="msource">ColumnModel</td>
  112. </tr>
  113. <tr class="config-row alt expandable">
  114. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  115. <td class="sig">
  116. <a id="Ext.grid.ColumnModel-id"></a>
  117. <b>id</b> : String <div class="mdesc">
  118. <div class="short">(optional) Defaults to the column's initial ordinal position. A name which identifies this column. The id is used to ...</div>
  119. <div class="long">
  120. (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.Grid" ext:member="autoExpandColumn" href="output/Ext.grid.Grid.html#autoExpandColumn">Ext.grid.Grid.autoExpandColumn</a> grid config option references the column via this identifier. </div>
  121. </div>
  122. </td>
  123. <td class="msource">ColumnModel</td>
  124. </tr>
  125. <tr class="config-row inherited expandable">
  126. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  127. <td class="sig">
  128. <a id="Ext.grid.ColumnModel-listeners"></a>
  129. <b>listeners</b> : Object <div class="mdesc">
  130. <div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
  131. <div class="long">
  132. 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>
  133. </div>
  134. </td>
  135. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
  136. </tr>
  137. <tr class="config-row alt expandable">
  138. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  139. <td class="sig">
  140. <a id="Ext.grid.ColumnModel-renderer"></a>
  141. <b>renderer</b> : Function <div class="mdesc">
  142. <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>
  143. <div class="long">
  144. (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>
  145. </div>
  146. </td>
  147. <td class="msource">ColumnModel</td>
  148. </tr>
  149. <tr class="config-row">
  150. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  151. <td class="sig">
  152. <a id="Ext.grid.ColumnModel-resizable"></a>
  153. <b>resizable</b> : Boolean <div class="mdesc">
  154. (optional) False to disable column resizing. Defaults to true. </div>
  155. </td>
  156. <td class="msource">ColumnModel</td>
  157. </tr>
  158. <tr class="config-row alt expandable">
  159. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  160. <td class="sig">
  161. <a id="Ext.grid.ColumnModel-sortable"></a>
  162. <b>sortable</b> : Boolean <div class="mdesc">
  163. <div class="short">(optional) True if sorting is to be allowed on this column. Defaults to the value of the defaultSortable property. Wh...</div>
  164. <div class="long">
  165. (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>
  166. </div>
  167. </td>
  168. <td class="msource">ColumnModel</td>
  169. </tr>
  170. <tr class="config-row expandable">
  171. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  172. <td class="sig">
  173. <a id="Ext.grid.ColumnModel-width"></a>
  174. <b>width</b> : Number <div class="mdesc">
  175. <div class="short">(optional) The initial width in pixels of the column. Using this instead of Ext.grid.Grid.autoSizeColumns is more eff...</div>
  176. <div class="long">
  177. (optional) The initial width in pixels of the column. Using this instead of <a ext:cls="Ext.grid.Grid" ext:member="autoSizeColumns" href="output/Ext.grid.Grid.html#autoSizeColumns">Ext.grid.Grid.autoSizeColumns</a> is more efficient. </div>
  178. </div>
  179. </td>
  180. <td class="msource">ColumnModel</td>
  181. </tr>
  182. </table>
  183. <a id="Ext.grid.ColumnModel-props"></a>
  184. <h2>Public Properties</h2>
  185. <table cellspacing="0" class="member-table">
  186. <tr>
  187. <th class="sig-header" colspan="2">Property</th>
  188. <th class="msource-header">Defined By</th>
  189. </tr>
  190. <tr class="property-row">
  191. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  192. <td class="sig">
  193. <a id="Ext.grid.ColumnModel-defaultSortable"></a>
  194. <b>defaultSortable</b> : Boolean <div class="mdesc">
  195. Default sortable of columns which have no sortable specified (defaults to false) </div>
  196. </td>
  197. <td class="msource">ColumnModel</td>
  198. </tr>
  199. <tr class="property-row alt">
  200. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  201. <td class="sig">
  202. <a id="Ext.grid.ColumnModel-defaultWidth"></a>
  203. <b>defaultWidth</b> : Number <div class="mdesc">
  204. The width of columns which have no width specified (defaults to 100) </div>
  205. </td>
  206. <td class="msource">ColumnModel</td>
  207. </tr>
  208. <tr class="property-row">
  209. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  210. <td class="sig">
  211. <a id="Ext.grid.ColumnModel-setConfig"></a>
  212. <b>setConfig</b> : Object <div class="mdesc">
  213. The config passed into the constructor </div>
  214. </td>
  215. <td class="msource">ColumnModel</td>
  216. </tr>
  217. </table>
  218. <a id="Ext.grid.ColumnModel-methods"></a>
  219. <h2>Public Methods</h2>
  220. <table cellspacing="0" class="member-table">
  221. <tr>
  222. <th class="sig-header" colspan="2">Method</th>
  223. <th class="msource-header">Defined By</th>
  224. </tr>
  225. <tr class="method-row expandable">
  226. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  227. <td class="sig">
  228. <a id="Ext.grid.ColumnModel-ColumnModel"></a>
  229. <b>ColumnModel</b>(&nbsp;<code>Object config</code>&nbsp;) <div class="mdesc">
  230. <div class="short"></div>
  231. <div class="long">
  232. <div class="mdetail-params">
  233. <strong>Parameters:</strong>
  234. <ul><li><code>config</code> : Object<div class="sub-desc">An Array of column config objects. See this class's
  235. config objects for details.</div></li> </ul>
  236. <strong>Returns:</strong>
  237. <ul>
  238. <li><code></code></li>
  239. </ul>
  240. </div>
  241. </div>
  242. </div>
  243. </td>
  244. <td class="msource">ColumnModel</td>
  245. </tr>
  246. <tr class="method-row inherited alt expandable">
  247. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  248. <td class="sig">
  249. <a id="Ext.grid.ColumnModel-addEvents"></a>
  250. <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void <div class="mdesc">
  251. <div class="short">Used to define events on this Observable</div>
  252. <div class="long">
  253. Used to define events on this Observable <div class="mdetail-params">
  254. <strong>Parameters:</strong>
  255. <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
  256. <strong>Returns:</strong>
  257. <ul>
  258. <li><code>void</code></li>
  259. </ul>
  260. </div>
  261. </div>
  262. </div>
  263. </td>
  264. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
  265. </tr>
  266. <tr class="method-row inherited expandable">
  267. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  268. <td class="sig">
  269. <a id="Ext.grid.ColumnModel-addListener"></a>
  270. <b>addListener</b>(&nbsp;<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>&nbsp;) : void <div class="mdesc">
  271. <div class="short">Appends an event handler to this component</div>
  272. <div class="long">
  273. Appends an event handler to this component <div class="mdetail-params">
  274. <strong>Parameters:</strong>
  275. <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
  276. function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
  277. properties. This may contain any of the following properties:<ul>
  278. <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>
  279. <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>
  280. <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>
  281. <li>buffer {Number} 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
  282. by the specified number of milliseconds. If the event fires again within that time, the original
  283. handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>
  284. </ul><br>
  285. <p>
  286. <b>Combining Options</b><br>
  287. Using the options argument, it is possible to combine different types of listeners:<br>
  288. <br>
  289. A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
  290. <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
  291. single: true,
  292. delay: 100,
  293. forumId: 4
  294. });</code></pre>
  295. <p>
  296. <b>Attaching multiple handlers in 1 call</b><br>
  297. The method also allows for a single argument to be passed which is a config object containing properties
  298. which specify multiple handlers.
  299. <p>
  300. <pre><code>foo.on({
  301. <em>'click'</em> : {
  302. fn: <b>this</b>.onClick,
  303. scope: <b>this</b>,
  304. delay: 100
  305. },
  306. <em>'mouseover'</em> : {
  307. fn: <b>this</b>.onMouseOver,
  308. scope: <b>this</b>
  309. },
  310. <em>'mouseout'</em> : {
  311. fn: <b>this</b>.onMouseOut,
  312. scope: <b>this</b>
  313. }
  314. });</code></pre>
  315. <p>
  316. Or a shorthand syntax:<br>
  317. <pre><code>foo.on({
  318. <em>'click'</em> : <b>this</b>.onClick,
  319. <em>'mouseover'</em> : <b>this</b>.onMouseOver,
  320. <em>'mouseout'</em> : <b>this</b>.onMouseOut,
  321. scope: <b>this</b>
  322. });</code></pre></div></li> </ul>
  323. <strong>Returns:</strong>
  324. <ul>
  325. <li><code>void</code></li>
  326. </ul>
  327. </div>
  328. </div>
  329. </div>
  330. </td>
  331. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
  332. </tr>
  333. <tr class="method-row inherited alt expandable">
  334. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  335. <td class="sig">
  336. <a id="Ext.grid.ColumnModel-fireEvent"></a>
  337. <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean <div class="mdesc">
  338. <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
  339. <div class="long">
  340. Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
  341. <strong>Parameters:</strong>
  342. <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>
  343. <strong>Returns:</strong>
  344. <ul>
  345. <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
  346. </ul>
  347. </div>
  348. </div>
  349. </div>
  350. </td>
  351. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
  352. </tr>
  353. <tr class="method-row expandable">
  354. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  355. <td class="sig">
  356. <a id="Ext.grid.ColumnModel-getCellEditor"></a>
  357. <b>getCellEditor</b>(&nbsp;<code>Number colIndex</code>, <code>Number rowIndex</code>&nbsp;) : Object <div class="mdesc">
  358. <div class="short">Returns the editor defined for the cell/column.</div>
  359. <div class="long">
  360. Returns the editor defined for the cell/column. <div class="mdetail-params">
  361. <strong>Parameters:</strong>
  362. <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>
  363. <strong>Returns:</strong>
  364. <ul>
  365. <li><code>Object</code></li>
  366. </ul>
  367. </div>
  368. </div>
  369. </div>
  370. </td>
  371. <td class="msource">ColumnModel</td>
  372. </tr>
  373. <tr class="method-row alt expandable">
  374. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  375. <td class="sig">
  376. <a id="Ext.grid.ColumnModel-getColumnById"></a>
  377. <b>getColumnById</b>(&nbsp;<code>String id</code>&nbsp;) : Object <div class="mdesc">
  378. <div class="short">Returns the column for a specified id.</div>
  379. <div class="long">
  380. Returns the column for a specified id. <div class="mdetail-params">
  381. <strong>Parameters:</strong>
  382. <ul><li><code>id</code> : String<div class="sub-desc">The column id</div></li> </ul>
  383. <strong>Returns:</strong>
  384. <ul>
  385. <li><code>Object</code><div class="sub-desc">the column</div></li>
  386. </ul>
  387. </div>
  388. </div>
  389. </div>
  390. </td>
  391. <td class="msource">ColumnModel</td>
  392. </tr>
  393. <tr class="method-row expandable">
  394. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  395. <td class="sig">
  396. <a id="Ext.grid.ColumnModel-getColumnCount"></a>
  397. <b>getColumnCount</b>() : Number <div class="mdesc">
  398. <div class="short">Returns the number of columns.</div>
  399. <div class="long">
  400. Returns the number of columns. <div class="mdetail-params">
  401. <strong>Parameters:</strong>
  402. <ul><li>None.</li> </ul>
  403. <strong>Returns:</strong>
  404. <ul>
  405. <li><code>Number</code></li>
  406. </ul>
  407. </div>
  408. </div>
  409. </div>
  410. </td>
  411. <td class="msource">ColumnModel</td>
  412. </tr>
  413. <tr class="method-row alt expandable">
  414. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  415. <td class="sig">
  416. <a id="Ext.grid.ColumnModel-getColumnHeader"></a>
  417. <b>getColumnHeader</b>(&nbsp;<code>Number col</code>&nbsp;) : String <div class="mdesc">
  418. <div class="short">Returns the header for the specified column.</div>
  419. <div class="long">
  420. Returns the header for the specified column. <div class="mdetail-params">
  421. <strong>Parameters:</strong>
  422. <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  423. <strong>Returns:</strong>
  424. <ul>
  425. <li><code>String</code></li>
  426. </ul>
  427. </div>
  428. </div>
  429. </div>
  430. </td>
  431. <td class="msource">ColumnModel</td>
  432. </tr>
  433. <tr class="method-row expandable">
  434. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  435. <td class="sig">
  436. <a id="Ext.grid.ColumnModel-getColumnId"></a>
  437. <b>getColumnId</b>(&nbsp;<code>Number index</code>&nbsp;) : String <div class="mdesc">
  438. <div class="short">
  439. Returns the id of the column at the specified index.</div>
  440. <div class="long">
  441. Returns the id of the column at the specified index. <div class="mdetail-params">
  442. <strong>Parameters:</strong>
  443. <ul><li><code>index</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  444. <strong>Returns:</strong>
  445. <ul>
  446. <li><code>String</code><div class="sub-desc">the id</div></li>
  447. </ul>
  448. </div>
  449. </div>
  450. </div>
  451. </td>
  452. <td class="msource">ColumnModel</td>
  453. </tr>
  454. <tr class="method-row alt expandable">
  455. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  456. <td class="sig">
  457. <a id="Ext.grid.ColumnModel-getColumnTooltip"></a>
  458. <b>getColumnTooltip</b>(&nbsp;<code>Number col</code>&nbsp;) : String <div class="mdesc">
  459. <div class="short">Returns the tooltip for the specified column.</div>
  460. <div class="long">
  461. Returns the tooltip for the specified column. <div class="mdetail-params">
  462. <strong>Parameters:</strong>
  463. <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  464. <strong>Returns:</strong>
  465. <ul>
  466. <li><code>String</code></li>
  467. </ul>
  468. </div>
  469. </div>
  470. </div>
  471. </td>
  472. <td class="msource">ColumnModel</td>
  473. </tr>
  474. <tr class="method-row expandable">
  475. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  476. <td class="sig">
  477. <a id="Ext.grid.ColumnModel-getColumnWidth"></a>
  478. <b>getColumnWidth</b>(&nbsp;<code>Number col</code>&nbsp;) : Number <div class="mdesc">
  479. <div class="short">Returns the width for the specified column.</div>
  480. <div class="long">
  481. Returns the width for the specified column. <div class="mdetail-params">
  482. <strong>Parameters:</strong>
  483. <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  484. <strong>Returns:</strong>
  485. <ul>
  486. <li><code>Number</code></li>
  487. </ul>
  488. </div>
  489. </div>
  490. </div>
  491. </td>
  492. <td class="msource">ColumnModel</td>
  493. </tr>
  494. <tr class="method-row alt expandable">
  495. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  496. <td class="sig">
  497. <a id="Ext.grid.ColumnModel-getColumnsBy"></a>
  498. <b>getColumnsBy</b>(&nbsp;<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : Array <div class="mdesc">
  499. <div class="short">Returns the column configs that return true by the passed function that is called with (columnConfig, index)</div>
  500. <div class="long">
  501. Returns the column configs that return true by the passed function that is called with (columnConfig, index) <div class="mdetail-params">
  502. <strong>Parameters:</strong>
  503. <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>
  504. <strong>Returns:</strong>
  505. <ul>
  506. <li><code>Array</code><div class="sub-desc">result</div></li>
  507. </ul>
  508. </div>
  509. </div>
  510. </div>
  511. </td>
  512. <td class="msource">ColumnModel</td>
  513. </tr>
  514. <tr class="method-row expandable">
  515. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  516. <td class="sig">
  517. <a id="Ext.grid.ColumnModel-getDataIndex"></a>
  518. <b>getDataIndex</b>(&nbsp;<code>Number col</code>&nbsp;) : Number <div class="mdesc">
  519. <div class="short">Returns the dataIndex for the specified column.</div>
  520. <div class="long">
  521. Returns the dataIndex for the specified column. <div class="mdetail-params">
  522. <strong>Parameters:</strong>
  523. <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  524. <strong>Returns:</strong>
  525. <ul>
  526. <li><code>Number</code></li>
  527. </ul>
  528. </div>
  529. </div>
  530. </div>
  531. </td>
  532. <td class="msource">ColumnModel</td>
  533. </tr>
  534. <tr class="method-row alt expandable">
  535. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  536. <td class="sig">
  537. <a id="Ext.grid.ColumnModel-getIndexById"></a>
  538. <b>getIndexById</b>(&nbsp;<code>String id</code>&nbsp;) : Number <div class="mdesc">
  539. <div class="short">Returns the index for a specified column id.</div>
  540. <div class="long">
  541. Returns the index for a specified column id. <div class="mdetail-params">
  542. <strong>Parameters:</strong>
  543. <ul><li><code>id</code> : String<div class="sub-desc">The column id</div></li> </ul>
  544. <strong>Returns:</strong>
  545. <ul>
  546. <li><code>Number</code><div class="sub-desc">the index, or -1 if not found</div></li>
  547. </ul>
  548. </div>
  549. </div>
  550. </div>
  551. </td>
  552. <td class="msource">ColumnModel</td>
  553. </tr>
  554. <tr class="method-row expandable">
  555. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  556. <td class="sig">
  557. <a id="Ext.grid.ColumnModel-getRenderer"></a>
  558. <b>getRenderer</b>(&nbsp;<code>Number col</code>&nbsp;) : Function <div class="mdesc">
  559. <div class="short">Returns the rendering (formatting) function defined for the column.</div>
  560. <div class="long">
  561. Returns the rendering (formatting) function defined for the column. <div class="mdetail-params">
  562. <strong>Parameters:</strong>
  563. <ul><li><code>col</code> : Number<div class="sub-desc">The column index.</div></li> </ul>
  564. <strong>Returns:</strong>
  565. <ul>
  566. <li><code>Function</code><div class="sub-desc">The function used to render the cell. See {@link #setRenderer}.</div></li>
  567. </ul>
  568. </div>
  569. </div>
  570. </div>
  571. </td>
  572. <td class="msource">ColumnModel</td>
  573. </tr>
  574. <tr class="method-row alt expandable">
  575. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  576. <td class="sig">
  577. <a id="Ext.grid.ColumnModel-getTotalWidth"></a>
  578. <b>getTotalWidth</b>(&nbsp;<code>Boolean includeHidden</code>&nbsp;) : Number <div class="mdesc">
  579. <div class="short">Returns the total width of all columns.</div>
  580. <div class="long">
  581. Returns the total width of all columns. <div class="mdetail-params">
  582. <strong>Parameters:</strong>
  583. <ul><li><code>includeHidden</code> : Boolean<div class="sub-desc">True to include hidden column widths</div></li> </ul>
  584. <strong>Returns:</strong>
  585. <ul>
  586. <li><code>Number</code></li>
  587. </ul>
  588. </div>
  589. </div>
  590. </div>
  591. </td>
  592. <td class="msource">ColumnModel</td>
  593. </tr>
  594. <tr class="method-row inherited expandable">
  595. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  596. <td class="sig">
  597. <a id="Ext.grid.ColumnModel-hasListener"></a>
  598. <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean <div class="mdesc">
  599. <div class="short">Checks to see if this object has any listeners for a specified event</div>
  600. <div class="long">
  601. Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
  602. <strong>Parameters:</strong>
  603. <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
  604. <strong>Returns:</strong>
  605. <ul>
  606. <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
  607. </ul>
  608. </div>
  609. </div>
  610. </div>
  611. </td>
  612. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
  613. </tr>
  614. <tr class="method-row alt expandable">
  615. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  616. <td class="sig">
  617. <a id="Ext.grid.ColumnModel-isCellEditable"></a>
  618. <b>isCellEditable</b>(&nbsp;<code>Number colIndex</code>, <code>Number rowIndex</code>&nbsp;) : Boolean <div class="mdesc">
  619. <div class="short">Returns true if the cell is editable.</div>
  620. <div class="long">
  621. Returns true if the cell is editable. <div class="mdetail-params">
  622. <strong>Parameters:</strong>
  623. <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>
  624. <strong>Returns:</strong>
  625. <ul>
  626. <li><code>Boolean</code></li>
  627. </ul>
  628. </div>
  629. </div>
  630. </div>
  631. </td>
  632. <td class="msource">ColumnModel</td>
  633. </tr>
  634. <tr class="method-row expandable">
  635. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  636. <td class="sig">
  637. <a id="Ext.grid.ColumnModel-isFixed"></a>
  638. <b>isFixed</b>() : void <div class="mdesc">
  639. <div class="short">Returns true if the column width cannot be changed</div>
  640. <div class="long">
  641. Returns true if the column width cannot be changed <div class="mdetail-params">
  642. <strong>Parameters:</strong>
  643. <ul><li>None.</li> </ul>
  644. <strong>Returns:</strong>
  645. <ul>
  646. <li><code>void</code></li>
  647. </ul>
  648. </div>
  649. </div>
  650. </div>
  651. </td>
  652. <td class="msource">ColumnModel</td>
  653. </tr>
  654. <tr class="method-row alt expandable">
  655. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  656. <td class="sig">
  657. <a id="Ext.grid.ColumnModel-isHidden"></a>
  658. <b>isHidden</b>(&nbsp;<code>Number colIndex</code>&nbsp;) : Boolean <div class="mdesc">
  659. <div class="short">Returns true if the column is hidden.</div>
  660. <div class="long">
  661. Returns true if the column is hidden. <div class="mdetail-params">
  662. <strong>Parameters:</strong>
  663. <ul><li><code>colIndex</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  664. <strong>Returns:</strong>
  665. <ul>
  666. <li><code>Boolean</code></li>
  667. </ul>
  668. </div>
  669. </div>
  670. </div>
  671. </td>
  672. <td class="msource">ColumnModel</td>
  673. </tr>
  674. <tr class="method-row expandable">
  675. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  676. <td class="sig">
  677. <a id="Ext.grid.ColumnModel-isResizable"></a>
  678. <b>isResizable</b>() : Boolean <div class="mdesc">
  679. <div class="short">Returns true if the column can be resized</div>
  680. <div class="long">
  681. Returns true if the column can be resized <div class="mdetail-params">
  682. <strong>Parameters:</strong>
  683. <ul><li>None.</li> </ul>
  684. <strong>Returns:</strong>
  685. <ul>
  686. <li><code>Boolean</code></li>
  687. </ul>
  688. </div>
  689. </div>
  690. </div>
  691. </td>
  692. <td class="msource">ColumnModel</td>
  693. </tr>
  694. <tr class="method-row alt expandable">
  695. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  696. <td class="sig">
  697. <a id="Ext.grid.ColumnModel-isSortable"></a>
  698. <b>isSortable</b>(&nbsp;<code>Number col</code>&nbsp;) : Boolean <div class="mdesc">
  699. <div class="short">Returns true if the specified column is sortable.</div>
  700. <div class="long">
  701. Returns true if the specified column is sortable. <div class="mdetail-params">
  702. <strong>Parameters:</strong>
  703. <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li> </ul>
  704. <strong>Returns:</strong>
  705. <ul>
  706. <li><code>Boolean</code></li>
  707. </ul>
  708. </div>
  709. </div>
  710. </div>
  711. </td>
  712. <td class="msource">ColumnModel</td>
  713. </tr>
  714. <tr class="method-row inherited expandable">
  715. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  716. <td class="sig">
  717. <a id="Ext.grid.ColumnModel-on"></a>
  718. <b>on</b>(&nbsp;<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>&nbsp;) : void <div class="mdesc">
  719. <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
  720. <div class="long">
  721. Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
  722. <strong>Parameters:</strong>
  723. <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
  724. function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
  725. <strong>Returns:</strong>
  726. <ul>
  727. <li><code>void</code></li>
  728. </ul>
  729. </div>
  730. </div>
  731. </div>
  732. </td>
  733. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
  734. </tr>
  735. <tr class="method-row inherited alt expandable">
  736. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  737. <td class="sig">
  738. <a id="Ext.grid.ColumnModel-purgeListeners"></a>
  739. <b>purgeListeners</b>() : void <div class="mdesc">
  740. <div class="short">Removes all listeners for this object</div>
  741. <div class="long">
  742. Removes all listeners for this object <div class="mdetail-params">
  743. <strong>Parameters:</strong>
  744. <ul><li>None.</li> </ul>
  745. <strong>Returns:</strong>
  746. <ul>
  747. <li><code>void</code></li>
  748. </ul>
  749. </div>
  750. </div>
  751. </div>
  752. </td>
  753. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
  754. </tr>
  755. <tr class="method-row inherited expandable">
  756. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  757. <td class="sig">
  758. <a id="Ext.grid.ColumnModel-removeListener"></a>
  759. <b>removeListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void <div class="mdesc">
  760. <div class="short">Removes a listener</div>
  761. <div class="long">
  762. Removes a listener <div class="mdetail-params">
  763. <strong>Parameters:</strong>
  764. <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>
  765. <strong>Returns:</strong>
  766. <ul>
  767. <li><code>void</code></li>
  768. </ul>
  769. </div>
  770. </div>
  771. </div>
  772. </td>
  773. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
  774. </tr>
  775. <tr class="method-row inherited alt expandable">
  776. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  777. <td class="sig">
  778. <a id="Ext.grid.ColumnModel-resumeEvents"></a>
  779. <b>resumeEvents</b>() : void <div class="mdesc">
  780. <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>
  781. <div class="long">
  782. 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">
  783. <strong>Parameters:</strong>
  784. <ul><li>None.</li> </ul>
  785. <strong>Returns:</strong>
  786. <ul>
  787. <li><code>void</code></li>
  788. </ul>
  789. </div>
  790. </div>
  791. </div>
  792. </td>
  793. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
  794. </tr>
  795. <tr class="method-row expandable">
  796. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  797. <td class="sig">
  798. <a id="Ext.grid.ColumnModel-setColumnHeader"></a>
  799. <b>setColumnHeader</b>(&nbsp;<code>Number col</code>, <code>String header</code>&nbsp;) : void <div class="mdesc">
  800. <div class="short">Sets the header for a column.</div>
  801. <div class="long">
  802. Sets the header for a column. <div class="mdetail-params">
  803. <strong>Parameters:</strong>
  804. <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>
  805. <strong>Returns:</strong>
  806. <ul>
  807. <li><code>void</code></li>
  808. </ul>
  809. </div>
  810. </div>
  811. </div>
  812. </td>
  813. <td class="msource">ColumnModel</td>
  814. </tr>
  815. <tr class="method-row alt expandable">
  816. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  817. <td class="sig">
  818. <a id="Ext.grid.ColumnModel-setColumnTooltip"></a>
  819. <b>setColumnTooltip</b>(&nbsp;<code>Number col</code>, <code>String tooltip</code>&nbsp;) : void <div class="mdesc">
  820. <div class="short">Sets the tooltip for a column.</div>
  821. <div class="long">
  822. Sets the tooltip for a column. <div class="mdetail-params">
  823. <strong>Parameters:</strong>
  824. <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>
  825. <strong>Returns:</strong>
  826. <ul>
  827. <li><code>void</code></li>
  828. </ul>
  829. </div>
  830. </div>
  831. </div>
  832. </td>
  833. <td class="msource">ColumnModel</td>
  834. </tr>
  835. <tr class="method-row expandable">
  836. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  837. <td class="sig">
  838. <a id="Ext.grid.ColumnModel-setColumnWidth"></a>
  839. <b>setColumnWidth</b>(&nbsp;<code>Number col</code>, <code>Number width</code>&nbsp;) : void <div class="mdesc">
  840. <div class="short">Sets the width for a column.</div>
  841. <div class="long">
  842. Sets the width for a column. <div class="mdetail-params">
  843. <strong>Parameters:</strong>
  844. <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>
  845. <strong>Returns:</strong>
  846. <ul>
  847. <li><code>void</code></li>
  848. </ul>
  849. </div>
  850. </div>
  851. </div>
  852. </td>
  853. <td class="msource">ColumnModel</td>
  854. </tr>
  855. <tr class="method-row alt expandable">
  856. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  857. <td class="sig">
  858. <a id="Ext.grid.ColumnModel-setConfig"></a>
  859. <b>setConfig</b>(&nbsp;<code>Array config</code>&nbsp;) : void <div class="mdesc">
  860. <div class="short">Reconfigures this column model</div>
  861. <div class="long">
  862. Reconfigures this column model <div class="mdetail-params">
  863. <strong>Parameters:</strong>
  864. <ul><li><code>config</code> : Array<div class="sub-desc">Array of Column configs</div></li> </ul>
  865. <strong>Returns:</strong>
  866. <ul>
  867. <li><code>void</code></li>
  868. </ul>
  869. </div>
  870. </div>
  871. </div>
  872. </td>
  873. <td class="msource">ColumnModel</td>
  874. </tr>
  875. <tr class="method-row expandable">
  876. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  877. <td class="sig">
  878. <a id="Ext.grid.ColumnModel-setDataIndex"></a>
  879. <b>setDataIndex</b>(&nbsp;<code>Number col</code>, <code>Number dataIndex</code>&nbsp;) : void <div class="mdesc">
  880. <div class="short">Sets the dataIndex for a column.</div>
  881. <div class="long">
  882. Sets the dataIndex for a column. <div class="mdetail-params">
  883. <strong>Parameters:</strong>
  884. <ul><li><code>col</code> : Number<div class="sub-desc">The column index</div></li><li><code>dataIndex</code> : Number<div class="sub-desc">The new dataIndex</div></li> </ul>
  885. <strong>Returns:</strong>
  886. <ul>
  887. <li><code>void</code></li>
  888. </ul>
  889. </div>
  890. </div>
  891. </div>
  892. </td>
  893. <td class="msource">ColumnModel</td>
  894. </tr>
  895. <tr class="method-row alt expandable">
  896. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  897. <td class="sig">
  898. <a id="Ext.grid.ColumnModel-setEditable"></a>
  899. <b>setEditable</b>(&nbsp;<code>Number col</code>, <code>Boolean editable</code>&nbsp;) : void <div class="mdesc">
  900. <div class="short">Sets if a column is editable.</div>
  901. <div class="long">
  902. Sets if a column is editable. <div class="mdetail-params">
  903. <strong>Parameters:</strong>
  904. <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>
  905. <strong>Returns:</strong>
  906. <ul>
  907. <li><code>void</code></li>
  908. </ul>
  909. </div>
  910. </div>
  911. </div>
  912. </td>
  913. <td class="msource">ColumnModel</td>
  914. </tr>
  915. <tr class="method-row expandable">
  916. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  917. <td class="sig">
  918. <a id="Ext.grid.ColumnModel-setEditor"></a>
  919. <b>setEditor</b>(&nbsp;<code>Number col</code>, <code>Object editor</code>&nbsp;) : void <div class="mdesc">
  920. <div class="short">Sets the editor for a column.</div>
  921. <div class="long">
  922. Sets the editor for a column. <div class="mdetail-params">
  923. <strong>Parameters:</strong>
  924. <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>
  925. <strong>Returns:</strong>
  926. <ul>
  927. <li><code>void</code></li>
  928. </ul>
  929. </div>
  930. </div>
  931. </div>
  932. </td>
  933. <td class="msource">ColumnModel</td>
  934. </tr>
  935. <tr class="method-row alt expandable">
  936. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  937. <td class="sig">
  938. <a id="Ext.grid.ColumnModel-setHidden"></a>
  939. <b>setHidden</b>(&nbsp;<code>Number colIndex</code>, <code>Boolean hidden</code>&nbsp;) : void <div class="mdesc">
  940. <div class="short">Sets if a column is hidden.</div>
  941. <div class="long">
  942. Sets if a column is hidden. <div class="mdetail-params">
  943. <strong>Parameters:</strong>
  944. <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>
  945. <strong>Returns:</strong>
  946. <ul>
  947. <li><code>void</code></li>
  948. </ul>
  949. </div>
  950. </div>
  951. </div>
  952. </td>
  953. <td class="msource">ColumnModel</td>
  954. </tr>
  955. <tr class="method-row expandable">
  956. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  957. <td class="sig">
  958. <a id="Ext.grid.ColumnModel-setRenderer"></a>
  959. <b>setRenderer</b>(&nbsp;<code>Number col</code>, <code>Function fn</code>&nbsp;) : void <div class="mdesc">
  960. <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
  961. default formatting functions.</div>
  962. <div class="long">
  963. 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
  964. default formatting functions. <div class="mdetail-params">
  965. <strong>Parameters:</strong>
  966. <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
  967. to return HTML markup for the grid view. The render function is called with
  968. the following parameters:<ul>
  969. <li><b>value</b> : Object<p class="sub-desc">The data value for the cell.</p></li>
  970. <li><b>metadata</b> : Object<p class="sub-desc">An object in which you may set the following attributes:<ul>
  971. <li><b>css</b> : String<p class="sub-desc">A CSS class name to add to the cell's TD element.</p></li>
  972. <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
  973. (e.g. 'style="color:red;"').</p></li></ul></p></li>
  974. <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>
  975. <li><b>rowIndex</b> : Number<p class="sub-desc">Row index</p></li>
  976. <li><b>colIndex</b> : Number<p class="sub-desc">Column index</p></li>
  977. <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>
  978. <strong>Returns:</strong>
  979. <ul>
  980. <li><code>void</code></li>
  981. </ul>
  982. </div>
  983. </div>
  984. </div>
  985. </td>
  986. <td class="msource">ColumnModel</td>
  987. </tr>
  988. <tr class="method-row inherited alt expandable">
  989. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  990. <td class="sig">
  991. <a id="Ext.grid.ColumnModel-suspendEvents"></a>
  992. <b>suspendEvents</b>() : void <div class="mdesc">
  993. <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>
  994. <div class="long">
  995. 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">
  996. <strong>Parameters:</strong>
  997. <ul><li>None.</li> </ul>
  998. <strong>Returns:</strong>
  999. <ul>
  1000. <li><code>void</code></li>
  1001. </ul>
  1002. </div>
  1003. </div>
  1004. </div>
  1005. </td>
  1006. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
  1007. </tr>
  1008. <tr class="method-row inherited expandable">
  1009. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  1010. <td class="sig">
  1011. <a id="Ext.grid.ColumnModel-un"></a>
  1012. <b>un</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void <div class="mdesc">
  1013. <div class="short">Removes a listener (shorthand for removeListener)</div>
  1014. <div class="long">
  1015. Removes a listener (shorthand for removeListener) <div class="mdetail-params">
  1016. <strong>Parameters:</strong>
  1017. <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>
  1018. <strong>Returns:</strong>
  1019. <ul>
  1020. <li><code>void</code></li>
  1021. </ul>
  1022. </div>
  1023. </div>
  1024. </div>
  1025. </td>
  1026. <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
  1027. </tr>
  1028. </table>
  1029. <a id="Ext.grid.ColumnModel-events"></a>
  1030. <h2>Public Events</h2>
  1031. <table cellspacing="0" class="member-table">
  1032. <tr>
  1033. <th class="sig-header" colspan="2">Event</th>
  1034. <th class="msource-header">Defined By</th>
  1035. </tr>
  1036. <tr class="event-row expandable">
  1037. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  1038. <td class="sig">
  1039. <a id="Ext.grid.ColumnModel-columnmoved"></a>
  1040. <b>columnmoved</b> : (&nbsp;<code>ColumnModel this</code>, <code>Number oldIndex</code>, <code>Number newIndex</code>&nbsp;) <div class="mdesc">
  1041. <div class="short">Fires when a column is moved.</div>
  1042. <div class="long">
  1043. Fires when a column is moved. <div class="mdetail-params">
  1044. <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
  1045. <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>
  1046. </div>
  1047. </div>
  1048. </div>
  1049. </td>
  1050. <td class="msource">ColumnModel</td>
  1051. </tr>
  1052. <tr class="event-row alt expandable">
  1053. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  1054. <td class="sig">
  1055. <a id="Ext.grid.ColumnModel-configchanged"></a>
  1056. <b>configchanged</b> : (&nbsp;<code>ColumnModel this</code>&nbsp;) <div class="mdesc">
  1057. <div class="short">Fires when the configuration is changed</div>
  1058. <div class="long">
  1059. Fires when the configuration is changed <div class="mdetail-params">
  1060. <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
  1061. <ul><li><code>this</code> : ColumnModel<div class="sub-desc"></div></li> </ul>
  1062. </div>
  1063. </div>
  1064. </div>
  1065. </td>
  1066. <td class="msource">ColumnModel</td>
  1067. </tr>
  1068. <tr class="event-row expandable">
  1069. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  1070. <td class="sig">
  1071. <a id="Ext.grid.ColumnModel-headerchange"></a>
  1072. <b>headerchange</b> : (&nbsp;<code>ColumnModel this</code>, <code>Number columnIndex</code>, <code>String newText</code>&nbsp;) <div class="mdesc">
  1073. <div class="short">Fires when the text of a header changes.</div>
  1074. <div class="long">
  1075. Fires when the text of a header changes. <div class="mdetail-params">
  1076. <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
  1077. <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>
  1078. </div>
  1079. </div>
  1080. </div>
  1081. </td>
  1082. <td class="msource">ColumnModel</td>
  1083. </tr>
  1084. <tr class="event-row alt expandable">
  1085. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  1086. <td class="sig">
  1087. <a id="Ext.grid.ColumnModel-hiddenchange"></a>
  1088. <b>hiddenchange</b> : (&nbsp;<code>ColumnModel this</code>, <code>Number columnIndex</code>, <code>Boolean hidden</code>&nbsp;) <div class="mdesc">
  1089. <div class="short">Fires when a column is hidden or "unhidden".</div>
  1090. <div class="long">
  1091. Fires when a column is hidden or "unhidden". <div class="mdetail-params">
  1092. <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
  1093. <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>
  1094. </div>
  1095. </div>
  1096. </div>
  1097. </td>
  1098. <td class="msource">ColumnModel</td>
  1099. </tr>
  1100. <tr class="event-row expandable">
  1101. <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
  1102. <td class="sig">
  1103. <a id="Ext.grid.ColumnModel-widthchange"></a>
  1104. <b>widthchange</b> : (&nbsp;<code>ColumnModel this</code>, <code>Number columnIndex</code>, <code>Number newWidth</code>&nbsp;) <div class="mdesc">
  1105. <div class="short">Fires when the width of a column changes.</div>
  1106. <div class="long">
  1107. Fires when the width of a column changes. <div class="mdetail-params">
  1108. <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
  1109. <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>
  1110. </div>
  1111. </div>
  1112. </div>
  1113. </td>
  1114. <td class="msource">ColumnModel</td>
  1115. </tr>
  1116. </table>
  1117. </div>