1 | <div class="body-wrap"> |
---|
2 | <div class="top-tools"> |
---|
3 | <a class="inner-link" href="#Ext.grid.CellSelectionModel-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> |
---|
4 | <a class="inner-link" href="#Ext.grid.CellSelectionModel-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> |
---|
5 | <a class="inner-link" href="#Ext.grid.CellSelectionModel-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> |
---|
6 | <a class="inner-link" href="#Ext.grid.CellSelectionModel-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.CellSelectionModel"><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"/><a ext:cls="Ext.grid.AbstractSelectionModel" ext:member="" href="output/Ext.grid.AbstractSelectionModel.html">AbstractSelectionModel</a> |
---|
12 | <img src="resources/elbow-end.gif"/>CellSelectionModel</pre></div> |
---|
13 | <h1>Class Ext.grid.CellSelectionModel</h1> |
---|
14 | <table cellspacing="0"> |
---|
15 | <tr><td class="label">Package:</td><td class="hd-info">Ext.grid</td></tr> |
---|
16 | <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/CellSelectionModel.js" target="_blank">CellSelectionModel.js</a></td></tr> |
---|
17 | <tr><td class="label">Class:</td><td class="hd-info">CellSelectionModel</td></tr> |
---|
18 | <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.grid.AbstractSelectionModel" ext:member="" href="output/Ext.grid.AbstractSelectionModel.html">AbstractSelectionModel</a></td></tr> |
---|
19 | </table> |
---|
20 | <div class="description"> |
---|
21 | * |
---|
22 | This class provides the basic implementation for single cell selection in a grid. The object stored |
---|
23 | as the selection and returned by <a ext:cls="getSelectedCell" href="output/getSelectedCell.html">getSelectedCell</a> contains the following properties: |
---|
24 | <div class="mdetail-params"><ul> |
---|
25 | <li><b>record</b> : Ext.data.record<p class="sub-desc">The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Record</a> |
---|
26 | which provides the data for the row containing the selection</p></li> |
---|
27 | <li><b>cell</b> : Ext.data.record<p class="sub-desc">An object containing the |
---|
28 | following properties: |
---|
29 | <div class="mdetail-params"><ul> |
---|
30 | <li><b>rowIndex</b> : Number<p class="sub-desc">The index of the selected row</p></li> |
---|
31 | <li><b>cellIndex</b> : Number<p class="sub-desc">The index of the selected cell<br> |
---|
32 | <b>Note that due to possible column reordering, the cellIndex should not be used as an index into |
---|
33 | the Record's data. Instead, the <i>name</i> of the selected field should be determined |
---|
34 | in order to retrieve the data value from the record by name:</b><pre><code>var fieldName = grid.getColumnModel().getDataIndex(cellIndex); |
---|
35 | <b>var</b> data = record.get(fieldName);</code></pre></p></li> |
---|
36 | </ul></div></p></li> |
---|
37 | </ul></div> </div> |
---|
38 | |
---|
39 | <div class="hr"></div> |
---|
40 | <a id="Ext.grid.CellSelectionModel-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 inherited expandable"> |
---|
48 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
49 | <td class="sig"> |
---|
50 | <a id="Ext.grid.CellSelectionModel-listeners"></a> |
---|
51 | <b>listeners</b> : Object <div class="mdesc"> |
---|
52 | <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div> |
---|
53 | <div class="long"> |
---|
54 | (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div> |
---|
55 | </div> |
---|
56 | </td> |
---|
57 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td> |
---|
58 | </tr> |
---|
59 | </table> |
---|
60 | <a id="Ext.grid.CellSelectionModel-props"></a> |
---|
61 | <h2>Public Properties</h2> |
---|
62 | <div class="no-members">This class has no public properties.</div> <a id="Ext.grid.CellSelectionModel-methods"></a> |
---|
63 | <h2>Public Methods</h2> |
---|
64 | <table cellspacing="0" class="member-table"> |
---|
65 | <tr> |
---|
66 | <th class="sig-header" colspan="2">Method</th> |
---|
67 | <th class="msource-header">Defined By</th> |
---|
68 | </tr> |
---|
69 | <tr class="method-row expandable"> |
---|
70 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
71 | <td class="sig"> |
---|
72 | <a id="Ext.grid.CellSelectionModel-CellSelectionModel"></a> |
---|
73 | <b>CellSelectionModel</b>( <code>Object config</code> ) <div class="mdesc"> |
---|
74 | <div class="short"></div> |
---|
75 | <div class="long"> |
---|
76 | <div class="mdetail-params"> |
---|
77 | <strong>Parameters:</strong> |
---|
78 | <ul><li><code>config</code> : Object<div class="sub-desc">The object containing the configuration of this model.</div></li> </ul> |
---|
79 | <strong>Returns:</strong> |
---|
80 | <ul> |
---|
81 | <li><code></code></li> |
---|
82 | </ul> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | </div> |
---|
86 | </td> |
---|
87 | <td class="msource">CellSelectionModel</td> |
---|
88 | </tr> |
---|
89 | <tr class="method-row inherited alt expandable"> |
---|
90 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
91 | <td class="sig"> |
---|
92 | <a id="Ext.grid.CellSelectionModel-addEvents"></a> |
---|
93 | <b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc"> |
---|
94 | <div class="short">Used to define events on this Observable</div> |
---|
95 | <div class="long"> |
---|
96 | Used to define events on this Observable <div class="mdetail-params"> |
---|
97 | <strong>Parameters:</strong> |
---|
98 | <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul> |
---|
99 | <strong>Returns:</strong> |
---|
100 | <ul> |
---|
101 | <li><code>void</code></li> |
---|
102 | </ul> |
---|
103 | </div> |
---|
104 | </div> |
---|
105 | </div> |
---|
106 | </td> |
---|
107 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td> |
---|
108 | </tr> |
---|
109 | <tr class="method-row inherited expandable"> |
---|
110 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
111 | <td class="sig"> |
---|
112 | <a id="Ext.grid.CellSelectionModel-addListener"></a> |
---|
113 | <b>addListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc"> |
---|
114 | <div class="short">Appends an event handler to this component</div> |
---|
115 | <div class="long"> |
---|
116 | Appends an event handler to this component <div class="mdetail-params"> |
---|
117 | <strong>Parameters:</strong> |
---|
118 | <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 |
---|
119 | function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration |
---|
120 | properties. This may contain any of the following properties:<ul> |
---|
121 | <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> |
---|
122 | <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> |
---|
123 | <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> |
---|
124 | <li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed |
---|
125 | by the specified number of milliseconds. If the event fires again within that time, the original |
---|
126 | handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li> |
---|
127 | </ul><br> |
---|
128 | <p> |
---|
129 | <b>Combining Options</b><br> |
---|
130 | Using the options argument, it is possible to combine different types of listeners:<br> |
---|
131 | <br> |
---|
132 | A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId) |
---|
133 | <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, { |
---|
134 | single: true, |
---|
135 | delay: 100, |
---|
136 | forumId: 4 |
---|
137 | });</code></pre> |
---|
138 | <p> |
---|
139 | <b>Attaching multiple handlers in 1 call</b><br> |
---|
140 | The method also allows for a single argument to be passed which is a config object containing properties |
---|
141 | which specify multiple handlers. |
---|
142 | <p> |
---|
143 | <pre><code>foo.on({ |
---|
144 | <em>'click'</em> : { |
---|
145 | fn: <b>this</b>.onClick, |
---|
146 | scope: <b>this</b>, |
---|
147 | delay: 100 |
---|
148 | }, |
---|
149 | <em>'mouseover'</em> : { |
---|
150 | fn: <b>this</b>.onMouseOver, |
---|
151 | scope: <b>this</b> |
---|
152 | }, |
---|
153 | <em>'mouseout'</em> : { |
---|
154 | fn: <b>this</b>.onMouseOut, |
---|
155 | scope: <b>this</b> |
---|
156 | } |
---|
157 | });</code></pre> |
---|
158 | <p> |
---|
159 | Or a shorthand syntax:<br> |
---|
160 | <pre><code>foo.on({ |
---|
161 | <em>'click'</em> : <b>this</b>.onClick, |
---|
162 | <em>'mouseover'</em> : <b>this</b>.onMouseOver, |
---|
163 | <em>'mouseout'</em> : <b>this</b>.onMouseOut, |
---|
164 | scope: <b>this</b> |
---|
165 | });</code></pre></div></li> </ul> |
---|
166 | <strong>Returns:</strong> |
---|
167 | <ul> |
---|
168 | <li><code>void</code></li> |
---|
169 | </ul> |
---|
170 | </div> |
---|
171 | </div> |
---|
172 | </div> |
---|
173 | </td> |
---|
174 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td> |
---|
175 | </tr> |
---|
176 | <tr class="method-row alt expandable"> |
---|
177 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
178 | <td class="sig"> |
---|
179 | <a id="Ext.grid.CellSelectionModel-clearSelections"></a> |
---|
180 | <b>clearSelections</b>( <code>Boolean true</code> ) : void <div class="mdesc"> |
---|
181 | <div class="short">Clears all selections.</div> |
---|
182 | <div class="long"> |
---|
183 | Clears all selections. <div class="mdetail-params"> |
---|
184 | <strong>Parameters:</strong> |
---|
185 | <ul><li><code>true</code> : Boolean<div class="sub-desc">to prevent the gridview from being notified about the change.</div></li> </ul> |
---|
186 | <strong>Returns:</strong> |
---|
187 | <ul> |
---|
188 | <li><code>void</code></li> |
---|
189 | </ul> |
---|
190 | </div> |
---|
191 | </div> |
---|
192 | </div> |
---|
193 | </td> |
---|
194 | <td class="msource">CellSelectionModel</td> |
---|
195 | </tr> |
---|
196 | <tr class="method-row inherited expandable"> |
---|
197 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
198 | <td class="sig"> |
---|
199 | <a id="Ext.grid.CellSelectionModel-fireEvent"></a> |
---|
200 | <b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc"> |
---|
201 | <div class="short">Fires the specified event with the passed parameters (minus the event name).</div> |
---|
202 | <div class="long"> |
---|
203 | Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params"> |
---|
204 | <strong>Parameters:</strong> |
---|
205 | <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> |
---|
206 | <strong>Returns:</strong> |
---|
207 | <ul> |
---|
208 | <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li> |
---|
209 | </ul> |
---|
210 | </div> |
---|
211 | </div> |
---|
212 | </div> |
---|
213 | </td> |
---|
214 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td> |
---|
215 | </tr> |
---|
216 | <tr class="method-row alt expandable"> |
---|
217 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
218 | <td class="sig"> |
---|
219 | <a id="Ext.grid.CellSelectionModel-getSelectedCell"></a> |
---|
220 | <b>getSelectedCell</b>() : Array <div class="mdesc"> |
---|
221 | <div class="short">Returns the currently selected cell's row and column indexes as an array (e.g., [0, 0]).</div> |
---|
222 | <div class="long"> |
---|
223 | Returns the currently selected cell's row and column indexes as an array (e.g., [0, 0]). <div class="mdetail-params"> |
---|
224 | <strong>Parameters:</strong> |
---|
225 | <ul><li>None.</li> </ul> |
---|
226 | <strong>Returns:</strong> |
---|
227 | <ul> |
---|
228 | <li><code>Array</code><div class="sub-desc">An array containing the row and column indexes of the selected cell, or null if none selected.</div></li> |
---|
229 | </ul> |
---|
230 | </div> |
---|
231 | </div> |
---|
232 | </div> |
---|
233 | </td> |
---|
234 | <td class="msource">CellSelectionModel</td> |
---|
235 | </tr> |
---|
236 | <tr class="method-row inherited expandable"> |
---|
237 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
238 | <td class="sig"> |
---|
239 | <a id="Ext.grid.CellSelectionModel-hasListener"></a> |
---|
240 | <b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc"> |
---|
241 | <div class="short">Checks to see if this object has any listeners for a specified event</div> |
---|
242 | <div class="long"> |
---|
243 | Checks to see if this object has any listeners for a specified event <div class="mdetail-params"> |
---|
244 | <strong>Parameters:</strong> |
---|
245 | <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul> |
---|
246 | <strong>Returns:</strong> |
---|
247 | <ul> |
---|
248 | <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li> |
---|
249 | </ul> |
---|
250 | </div> |
---|
251 | </div> |
---|
252 | </div> |
---|
253 | </td> |
---|
254 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td> |
---|
255 | </tr> |
---|
256 | <tr class="method-row alt expandable"> |
---|
257 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
258 | <td class="sig"> |
---|
259 | <a id="Ext.grid.CellSelectionModel-hasSelection"></a> |
---|
260 | <b>hasSelection</b>() : Boolean <div class="mdesc"> |
---|
261 | <div class="short">Returns true if there is a selection.</div> |
---|
262 | <div class="long"> |
---|
263 | Returns true if there is a selection. <div class="mdetail-params"> |
---|
264 | <strong>Parameters:</strong> |
---|
265 | <ul><li>None.</li> </ul> |
---|
266 | <strong>Returns:</strong> |
---|
267 | <ul> |
---|
268 | <li><code>Boolean</code></li> |
---|
269 | </ul> |
---|
270 | </div> |
---|
271 | </div> |
---|
272 | </div> |
---|
273 | </td> |
---|
274 | <td class="msource">CellSelectionModel</td> |
---|
275 | </tr> |
---|
276 | <tr class="method-row inherited expandable"> |
---|
277 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
278 | <td class="sig"> |
---|
279 | <a id="Ext.grid.CellSelectionModel-isLocked"></a> |
---|
280 | <b>isLocked</b>() : Boolean <div class="mdesc"> |
---|
281 | <div class="short">Returns true if the selections are locked.</div> |
---|
282 | <div class="long"> |
---|
283 | Returns true if the selections are locked. <div class="mdetail-params"> |
---|
284 | <strong>Parameters:</strong> |
---|
285 | <ul><li>None.</li> </ul> |
---|
286 | <strong>Returns:</strong> |
---|
287 | <ul> |
---|
288 | <li><code>Boolean</code></li> |
---|
289 | </ul> |
---|
290 | </div> |
---|
291 | </div> |
---|
292 | </div> |
---|
293 | </td> |
---|
294 | <td class="msource"><a ext:cls="Ext.grid.AbstractSelectionModel" ext:member="#isLocked" href="output/Ext.grid.AbstractSelectionModel.html#isLocked">AbstractSelectionModel</a></td> |
---|
295 | </tr> |
---|
296 | <tr class="method-row inherited alt expandable"> |
---|
297 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
298 | <td class="sig"> |
---|
299 | <a id="Ext.grid.CellSelectionModel-lock"></a> |
---|
300 | <b>lock</b>() : void <div class="mdesc"> |
---|
301 | <div class="short">Locks the selections.</div> |
---|
302 | <div class="long"> |
---|
303 | Locks the selections. <div class="mdetail-params"> |
---|
304 | <strong>Parameters:</strong> |
---|
305 | <ul><li>None.</li> </ul> |
---|
306 | <strong>Returns:</strong> |
---|
307 | <ul> |
---|
308 | <li><code>void</code></li> |
---|
309 | </ul> |
---|
310 | </div> |
---|
311 | </div> |
---|
312 | </div> |
---|
313 | </td> |
---|
314 | <td class="msource"><a ext:cls="Ext.grid.AbstractSelectionModel" ext:member="#lock" href="output/Ext.grid.AbstractSelectionModel.html#lock">AbstractSelectionModel</a></td> |
---|
315 | </tr> |
---|
316 | <tr class="method-row inherited expandable"> |
---|
317 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
318 | <td class="sig"> |
---|
319 | <a id="Ext.grid.CellSelectionModel-on"></a> |
---|
320 | <b>on</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc"> |
---|
321 | <div class="short">Appends an event handler to this element (shorthand for addListener)</div> |
---|
322 | <div class="long"> |
---|
323 | Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params"> |
---|
324 | <strong>Parameters:</strong> |
---|
325 | <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 |
---|
326 | function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul> |
---|
327 | <strong>Returns:</strong> |
---|
328 | <ul> |
---|
329 | <li><code>void</code></li> |
---|
330 | </ul> |
---|
331 | </div> |
---|
332 | </div> |
---|
333 | </div> |
---|
334 | </td> |
---|
335 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td> |
---|
336 | </tr> |
---|
337 | <tr class="method-row inherited alt expandable"> |
---|
338 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
339 | <td class="sig"> |
---|
340 | <a id="Ext.grid.CellSelectionModel-purgeListeners"></a> |
---|
341 | <b>purgeListeners</b>() : void <div class="mdesc"> |
---|
342 | <div class="short">Removes all listeners for this object</div> |
---|
343 | <div class="long"> |
---|
344 | Removes all listeners for this object <div class="mdetail-params"> |
---|
345 | <strong>Parameters:</strong> |
---|
346 | <ul><li>None.</li> </ul> |
---|
347 | <strong>Returns:</strong> |
---|
348 | <ul> |
---|
349 | <li><code>void</code></li> |
---|
350 | </ul> |
---|
351 | </div> |
---|
352 | </div> |
---|
353 | </div> |
---|
354 | </td> |
---|
355 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td> |
---|
356 | </tr> |
---|
357 | <tr class="method-row inherited expandable"> |
---|
358 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
359 | <td class="sig"> |
---|
360 | <a id="Ext.grid.CellSelectionModel-relayEvents"></a> |
---|
361 | <b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc"> |
---|
362 | <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div> |
---|
363 | <div class="long"> |
---|
364 | Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params"> |
---|
365 | <strong>Parameters:</strong> |
---|
366 | <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul> |
---|
367 | <strong>Returns:</strong> |
---|
368 | <ul> |
---|
369 | <li><code>void</code></li> |
---|
370 | </ul> |
---|
371 | </div> |
---|
372 | </div> |
---|
373 | </div> |
---|
374 | </td> |
---|
375 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td> |
---|
376 | </tr> |
---|
377 | <tr class="method-row inherited alt expandable"> |
---|
378 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
379 | <td class="sig"> |
---|
380 | <a id="Ext.grid.CellSelectionModel-removeListener"></a> |
---|
381 | <b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc"> |
---|
382 | <div class="short">Removes a listener</div> |
---|
383 | <div class="long"> |
---|
384 | Removes a listener <div class="mdetail-params"> |
---|
385 | <strong>Parameters:</strong> |
---|
386 | <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> |
---|
387 | <strong>Returns:</strong> |
---|
388 | <ul> |
---|
389 | <li><code>void</code></li> |
---|
390 | </ul> |
---|
391 | </div> |
---|
392 | </div> |
---|
393 | </div> |
---|
394 | </td> |
---|
395 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td> |
---|
396 | </tr> |
---|
397 | <tr class="method-row inherited expandable"> |
---|
398 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
399 | <td class="sig"> |
---|
400 | <a id="Ext.grid.CellSelectionModel-resumeEvents"></a> |
---|
401 | <b>resumeEvents</b>() : void <div class="mdesc"> |
---|
402 | <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> |
---|
403 | <div class="long"> |
---|
404 | 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"> |
---|
405 | <strong>Parameters:</strong> |
---|
406 | <ul><li>None.</li> </ul> |
---|
407 | <strong>Returns:</strong> |
---|
408 | <ul> |
---|
409 | <li><code>void</code></li> |
---|
410 | </ul> |
---|
411 | </div> |
---|
412 | </div> |
---|
413 | </div> |
---|
414 | </td> |
---|
415 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td> |
---|
416 | </tr> |
---|
417 | <tr class="method-row alt expandable"> |
---|
418 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
419 | <td class="sig"> |
---|
420 | <a id="Ext.grid.CellSelectionModel-select"></a> |
---|
421 | <b>select</b>( <code>Number rowIndex</code>, <code>Number collIndex</code> ) : void <div class="mdesc"> |
---|
422 | <div class="short">Selects a cell.</div> |
---|
423 | <div class="long"> |
---|
424 | Selects a cell. <div class="mdetail-params"> |
---|
425 | <strong>Parameters:</strong> |
---|
426 | <ul><li><code>rowIndex</code> : Number<div class="sub-desc"></div></li><li><code>collIndex</code> : Number<div class="sub-desc"></div></li> </ul> |
---|
427 | <strong>Returns:</strong> |
---|
428 | <ul> |
---|
429 | <li><code>void</code></li> |
---|
430 | </ul> |
---|
431 | </div> |
---|
432 | </div> |
---|
433 | </div> |
---|
434 | </td> |
---|
435 | <td class="msource">CellSelectionModel</td> |
---|
436 | </tr> |
---|
437 | <tr class="method-row inherited expandable"> |
---|
438 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
439 | <td class="sig"> |
---|
440 | <a id="Ext.grid.CellSelectionModel-suspendEvents"></a> |
---|
441 | <b>suspendEvents</b>() : void <div class="mdesc"> |
---|
442 | <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> |
---|
443 | <div class="long"> |
---|
444 | 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"> |
---|
445 | <strong>Parameters:</strong> |
---|
446 | <ul><li>None.</li> </ul> |
---|
447 | <strong>Returns:</strong> |
---|
448 | <ul> |
---|
449 | <li><code>void</code></li> |
---|
450 | </ul> |
---|
451 | </div> |
---|
452 | </div> |
---|
453 | </div> |
---|
454 | </td> |
---|
455 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td> |
---|
456 | </tr> |
---|
457 | <tr class="method-row inherited alt expandable"> |
---|
458 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
459 | <td class="sig"> |
---|
460 | <a id="Ext.grid.CellSelectionModel-un"></a> |
---|
461 | <b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc"> |
---|
462 | <div class="short">Removes a listener (shorthand for removeListener)</div> |
---|
463 | <div class="long"> |
---|
464 | Removes a listener (shorthand for removeListener) <div class="mdetail-params"> |
---|
465 | <strong>Parameters:</strong> |
---|
466 | <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> |
---|
467 | <strong>Returns:</strong> |
---|
468 | <ul> |
---|
469 | <li><code>void</code></li> |
---|
470 | </ul> |
---|
471 | </div> |
---|
472 | </div> |
---|
473 | </div> |
---|
474 | </td> |
---|
475 | <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td> |
---|
476 | </tr> |
---|
477 | <tr class="method-row inherited expandable"> |
---|
478 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
479 | <td class="sig"> |
---|
480 | <a id="Ext.grid.CellSelectionModel-unlock"></a> |
---|
481 | <b>unlock</b>() : void <div class="mdesc"> |
---|
482 | <div class="short">Unlocks the selections.</div> |
---|
483 | <div class="long"> |
---|
484 | Unlocks the selections. <div class="mdetail-params"> |
---|
485 | <strong>Parameters:</strong> |
---|
486 | <ul><li>None.</li> </ul> |
---|
487 | <strong>Returns:</strong> |
---|
488 | <ul> |
---|
489 | <li><code>void</code></li> |
---|
490 | </ul> |
---|
491 | </div> |
---|
492 | </div> |
---|
493 | </div> |
---|
494 | </td> |
---|
495 | <td class="msource"><a ext:cls="Ext.grid.AbstractSelectionModel" ext:member="#unlock" href="output/Ext.grid.AbstractSelectionModel.html#unlock">AbstractSelectionModel</a></td> |
---|
496 | </tr> |
---|
497 | </table> |
---|
498 | <a id="Ext.grid.CellSelectionModel-events"></a> |
---|
499 | <h2>Public Events</h2> |
---|
500 | <table cellspacing="0" class="member-table"> |
---|
501 | <tr> |
---|
502 | <th class="sig-header" colspan="2">Event</th> |
---|
503 | <th class="msource-header">Defined By</th> |
---|
504 | </tr> |
---|
505 | <tr class="event-row expandable"> |
---|
506 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
507 | <td class="sig"> |
---|
508 | <a id="Ext.grid.CellSelectionModel-beforecellselect"></a> |
---|
509 | <b>beforecellselect</b> : ( <code>SelectionModel this</code>, <code>Number rowIndex</code>, <code>Number colIndex</code> ) <div class="mdesc"> |
---|
510 | <div class="short">Fires before a cell is selected.</div> |
---|
511 | <div class="long"> |
---|
512 | Fires before a cell is selected. <div class="mdetail-params"> |
---|
513 | <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong> |
---|
514 | <ul><li><code>this</code> : SelectionModel<div class="sub-desc"></div></li><li><code>rowIndex</code> : Number<div class="sub-desc">The selected row index</div></li><li><code>colIndex</code> : Number<div class="sub-desc">The selected cell index</div></li> </ul> |
---|
515 | </div> |
---|
516 | </div> |
---|
517 | </div> |
---|
518 | </td> |
---|
519 | <td class="msource">CellSelectionModel</td> |
---|
520 | </tr> |
---|
521 | <tr class="event-row alt expandable"> |
---|
522 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
523 | <td class="sig"> |
---|
524 | <a id="Ext.grid.CellSelectionModel-cellselect"></a> |
---|
525 | <b>cellselect</b> : ( <code>SelectionModel this</code>, <code>Number rowIndex</code>, <code>Number colIndex</code> ) <div class="mdesc"> |
---|
526 | <div class="short">Fires when a cell is selected.</div> |
---|
527 | <div class="long"> |
---|
528 | Fires when a cell is selected. <div class="mdetail-params"> |
---|
529 | <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong> |
---|
530 | <ul><li><code>this</code> : SelectionModel<div class="sub-desc"></div></li><li><code>rowIndex</code> : Number<div class="sub-desc">The selected row index</div></li><li><code>colIndex</code> : Number<div class="sub-desc">The selected cell index</div></li> </ul> |
---|
531 | </div> |
---|
532 | </div> |
---|
533 | </div> |
---|
534 | </td> |
---|
535 | <td class="msource">CellSelectionModel</td> |
---|
536 | </tr> |
---|
537 | <tr class="event-row expandable"> |
---|
538 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
539 | <td class="sig"> |
---|
540 | <a id="Ext.grid.CellSelectionModel-selectionchange"></a> |
---|
541 | <b>selectionchange</b> : ( <code>SelectionModel this</code>, <code>Object selection</code> ) <div class="mdesc"> |
---|
542 | <div class="short">Fires when the active selection changes.</div> |
---|
543 | <div class="long"> |
---|
544 | Fires when the active selection changes. <div class="mdetail-params"> |
---|
545 | <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong> |
---|
546 | <ul><li><code>this</code> : SelectionModel<div class="sub-desc"></div></li><li><code>selection</code> : Object<div class="sub-desc">null for no selection or an object (o) with two properties |
---|
547 | <ul> |
---|
548 | <li>o.record: the record object for the row the selection is in</li> |
---|
549 | <li>o.cell: An array of [rowIndex, columnIndex]</li> |
---|
550 | </ul></div></li> </ul> |
---|
551 | </div> |
---|
552 | </div> |
---|
553 | </div> |
---|
554 | </td> |
---|
555 | <td class="msource">CellSelectionModel</td> |
---|
556 | </tr> |
---|
557 | </table> |
---|
558 | |
---|
559 | </div> |
---|