Observable AbstractSelectionModel RowSelectionModel CheckboxSelectionModel
Package: | Ext.grid |
Defined In: | CheckboxSelectionModel.js |
Class: | CheckboxSelectionModel |
Extends: | RowSelectionModel |
Config Options | Defined By | |
---|---|---|
checkOnly : Boolean true if rows can only be selected by clicking on the
checkbox column (defaults to false). | CheckboxSelectionModel | |
header : String Any valid text or HTML fragment to display in the header cell for the
checkbox column. Defaults to:'<div class="... Any valid text or HTML fragment to display in the header cell for the
checkbox column. Defaults to:
The default CSS class of 'x-grid3-hd-checker' displays a checkbox in the header
and provides support for automatic check all/none behavior on header click. This string
can be replaced by any valid HTML fragment, including a simple text string (e.g.,
'Select Rows'), but the automatic check all/none behavior will only work if the
'x-grid3-hd-checker' class is supplied. | CheckboxSelectionModel | |
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 | |
sortable : Boolean true if the checkbox column is sortable (defaults to
false). | CheckboxSelectionModel | |
width : Number The default width in pixels of the checkbox column (defaults to 20). | CheckboxSelectionModel |
Property | Defined By | |
---|---|---|
grid : Object The GridPanel for which this SelectionModel is handling selection. Read-only. | AbstractSelectionModel |
Method | Defined By | |
---|---|---|
CheckboxSelectionModel( Object config )
Parameters:
| CheckboxSelectionModel | |
addEvents( Object|String o , string Optional. )
:
voidAdds 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 ] )
:
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:
| Observable | |
clearSelections( [Boolean fast ] )
:
voidClears 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 )
:
voidDeselects 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 ] )
:
voidDeselects 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 ] )
:
BooleanCalls 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( Object events )
:
voidEnables 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 )
:
BooleanFires 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 )
:
BooleanChecks 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 )
:
BooleanReturns 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 )
:
BooleanReturns 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 ] )
:
voidAppends 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 )
:
voidRelays 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 ] )
:
voidRemoves 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 ] )
:
voidSelect the last row. Select the last row. Parameters:
| RowSelectionModel | |
selectNext( [Boolean keepExisting ] )
:
BooleanSelects the row immediately following the last selected row. Selects the row immediately following the last selected row. Parameters:
| RowSelectionModel | |
selectPrevious( [Boolean keepExisting ] )
:
BooleanSelects 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 ] )
:
voidSelects 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 ] )
:
voidSelect records. Select records. Parameters:
| RowSelectionModel | |
selectRow( Number row , [Boolean keepExisting ], [Boolean preventViewNotify ] )
:
voidSelects 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 ] )
:
voidSelects multiple rows. Selects multiple rows. Parameters:
| RowSelectionModel | |
suspendEvents( Boolean queueSuspended )
:
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:
| Observable | |
un( String eventName , Function handler , [Object scope ] )
:
voidRemoves 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 |