Observable AbstractSelectionModel RowSelectionModel
Package: | Ext.grid |
Defined In: | RowSelectionModel.js |
Class: | RowSelectionModel |
Subclasses: | CheckboxSelectionModel |
Extends: | AbstractSelectionModel |
Config Options | Defined By | |
---|---|---|
listeners : Object A config object containing one or more event handlers to be added to this
object during initialization. This should ... 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 addListener example for attaching multiple handlers at once. DOM events from ExtJs Components While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
is usually only done when extra value can be added. For example the DataView's
| Observable | |
moveEditorOnEnter : Boolean false to turn off moving the editor to the next row down when the enter key is pressed
or the next row up when shift ... false to turn off moving the editor to the next row down when the enter key is pressed
or the next row up when shift + enter keys are pressed. | RowSelectionModel | |
singleSelect : Boolean true to allow selection of only one row at a time (defaults to false
allowing multiple selections) | RowSelectionModel |
Property | Defined By | |
---|---|---|
grid : Object The GridPanel for which this SelectionModel is handling selection. Read-only. | AbstractSelectionModel |
Method | Defined By | |
---|---|---|
RowSelectionModel( Object config ) Parameters:
| RowSelectionModel | |
addEvents( Object|String o, string Optional. ) : void Adds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. Parameters:
| Observable | |
addListener( String eventName, Function handler, [Object scope], [Object options] ) : void Appends an event handler to this object. Appends an event handler to this object. Parameters:
| Observable | |
clearSelections( [Boolean fast] ) : void Clears all selections if the selection model
is not locked. Clears all selections if the selection model
is not locked. Parameters:
| RowSelectionModel | |
deselectRange( Number startRow, Number endRow ) : void Deselects a range of rows if the selection model
is not locked.
All rows in between startRow and endRow are also de... Deselects a range of rows if the selection model
is not locked.
All rows in between startRow and endRow are also deselected. Parameters:
| RowSelectionModel | |
deselectRow( Number row, [Boolean preventViewNotify] ) : void Deselects a row. Before deselecting a row, checks if the selection model
is locked.
If this check is satisfied the r... Deselects a row. Before deselecting a row, checks if the selection model
is locked.
If this check is satisfied the row will be deselected and followed up by
firing the rowdeselect and selectionchange events. Parameters:
| RowSelectionModel | |
each( Function fn, [Object scope] ) : Boolean Calls the passed function with each selection. If the function returns
false, iteration is stopped and this function ... Calls the passed function with each selection. If the function returns
false, iteration is stopped and this function returns
false. Otherwise it returns true. Parameters:
| RowSelectionModel | |
enableBubble( String/Array events ) : void Enables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to access the required target more quickly. Example:
Parameters:
| Observable | |
fireEvent( String eventName, Object... args ) : Boolean Fires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... Fires the specified event with the passed parameters (minus the event name). An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble. Parameters:
| Observable | |
getCount() : Number Gets the number of selected rows. Gets the number of selected rows. Parameters:
| RowSelectionModel | |
getSelected() : Record Returns the first selected record. Returns the first selected record. Parameters:
| RowSelectionModel | |
getSelections() : Array Returns the selected records Returns the selected records Parameters:
| RowSelectionModel | |
hasListener( String eventName ) : Boolean Checks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event Parameters:
| Observable | |
hasNext() : Boolean Returns true if there is a next record to select Returns true if there is a next record to select Parameters:
| RowSelectionModel | |
hasPrevious() : Boolean Returns true if there is a previous record to select Returns true if there is a previous record to select Parameters:
| RowSelectionModel | |
hasSelection() : Boolean Returns true if there is a selection. Returns true if there is a selection. Parameters:
| RowSelectionModel | |
isIdSelected( String id ) : Boolean Returns true if the specified record id is selected. Returns true if the specified record id is selected. Parameters:
| RowSelectionModel | |
isLocked() : Boolean Returns true if the selections are locked. Returns true if the selections are locked. Parameters:
| AbstractSelectionModel | |
isSelected( Number/Record index ) : Boolean Returns true if the specified row is selected. Returns true if the specified row is selected. Parameters:
| RowSelectionModel | |
lock() : void Locks the selections. Locks the selections. Parameters:
| AbstractSelectionModel | |
on( String eventName, Function handler, [Object scope], [Object options] ) : void Appends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:
| Observable | |
purgeListeners() : void Removes all listeners for this object Removes all listeners for this object Parameters:
| Observable | |
relayEvents( Object o, Array events ) : void Relays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. Parameters:
| Observable | |
removeListener( String eventName, Function handler, [Object scope] ) : void Removes an event handler. Removes an event handler. Parameters:
| Observable | |
resumeEvents() : void Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
events fired during event suspension will be sent to any listeners now. Parameters:
| Observable | |
selectAll() : void Selects all rows if the selection model
is not locked. Selects all rows if the selection model
is not locked. Parameters:
| RowSelectionModel | |
selectFirstRow() : void Selects the first row in the grid. Selects the first row in the grid. Parameters:
| RowSelectionModel | |
selectLastRow( [Boolean keepExisting] ) : void Select the last row. Select the last row. Parameters:
| RowSelectionModel | |
selectNext( [Boolean keepExisting] ) : Boolean Selects the row immediately following the last selected row. Selects the row immediately following the last selected row. Parameters:
| RowSelectionModel | |
selectPrevious( [Boolean keepExisting] ) : Boolean Selects the row that precedes the last selected row. Selects the row that precedes the last selected row. Parameters:
| RowSelectionModel | |
selectRange( Number startRow, Number endRow, [Boolean keepExisting] ) : void Selects a range of rows if the selection model
is not locked.
All rows in between startRow and endRow are also select... Selects a range of rows if the selection model
is not locked.
All rows in between startRow and endRow are also selected. Parameters:
| RowSelectionModel | |
selectRecords( Array records, [Boolean keepExisting] ) : void Select records. Select records. Parameters:
| RowSelectionModel | |
selectRow( Number row, [Boolean keepExisting], [Boolean preventViewNotify] ) : void Selects a row. Before selecting a row, checks if the selection model
is locked and fires the
beforerowselect event. ... Selects a row. Before selecting a row, checks if the selection model
is locked and fires the
beforerowselect event. If these checks are satisfied the row
will be selected and followed up by firing the rowselect and
selectionchange events. Parameters:
| RowSelectionModel | |
selectRows( Array rows, [Boolean keepExisting] ) : void Selects multiple rows. Selects multiple rows. Parameters:
| RowSelectionModel | |
suspendEvents( Boolean queueSuspended ) : void Suspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:
| Observable | |
un( String eventName, Function handler, [Object scope] ) : void Removes an event handler (shorthand for removeListener.) Removes an event handler (shorthand for removeListener.) Parameters:
| Observable | |
unlock() : void Unlocks the selections. Unlocks the selections. Parameters:
| AbstractSelectionModel |
Event | Defined By | |
---|---|---|
beforerowselect : ( SelectionModel this, Number rowIndex, Boolean keepExisting, Record record ) Fires before a row is selected, return false to cancel the selection. Fires before a row is selected, return false to cancel the selection. Listeners will be called with the following arguments:
| RowSelectionModel | |
rowdeselect : ( SelectionModel this, Number rowIndex, Record record ) Fires when a row is deselected. To prevent deselection
lock the selections. Fires when a row is deselected. To prevent deselection
lock the selections. Listeners will be called with the following arguments:
| RowSelectionModel | |
rowselect : ( SelectionModel this, Number rowIndex, Ext.data.Record r ) Fires when a row is selected. Fires when a row is selected. Listeners will be called with the following arguments:
| RowSelectionModel | |
selectionchange : ( SelectionModel this ) Fires when the selection changes Fires when the selection changes Listeners will be called with the following arguments:
| RowSelectionModel |