This class has no public properties.
|
DefaultSelectionModel() |
DefaultSelectionModel |
|
|
addListener(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this component |
|
bufferedListener(String eventName , Function handler , [Object scope ], [Number millis ]) : Function |
Observable |
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specifie... |
|
clearSelections() : void |
DefaultSelectionModel |
Clears all selections. |
|
delayedListener(String eventName , Function handler , [Object scope ], [Number delay ]) : Function |
Observable |
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for e... |
|
deselectRange(Number/HTMLElement startRow , Number/HTMLElement endRow ) : void |
DefaultSelectionModel |
Deselects a range of rows. All rows in between startRow and endRow are also deselected. |
|
deselectRow(Number/HTMLElement row ) : void |
DefaultSelectionModel |
Deselects a row. |
|
fireEvent(String eventName , Object... args ) : Boolean |
Observable |
Fires the specified event with the passed parameters (minus the event name). |
|
focusRow(HTMLElement row ) : void |
DefaultSelectionModel |
Deprecated. Deprecated. Tries to focus the row and scroll it into view - Use grid.scrollTo or grid.getView().focusRow... |
|
getCount() : Number |
DefaultSelectionModel |
Gets the number of selected rows. |
|
getSelectedRowIds() : Array |
DefaultSelectionModel |
Returns the selected row ids. |
|
getSelectedRows() : Array |
DefaultSelectionModel |
Returns the selected rows. |
|
hasSelection() : Boolean |
DefaultSelectionModel |
Returns True if there is a selection. |
|
isLocked() : Boolean |
DefaultSelectionModel |
Returns true if the selections are locked |
|
isSelectable(HTMLElement row ) : Boolean |
DefaultSelectionModel |
Returns True if the specified row is selectable. |
|
isSelected(HTMLElement row ) : Boolean |
DefaultSelectionModel |
Returns True if the specified row is selected. |
|
lock() : void |
DefaultSelectionModel |
Lock the selections |
|
on(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this element (shorthand for addListener) |
|
purgeListeners() : void |
Observable |
Removes all listeners for this object |
|
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener |
|
selectAll() : void |
DefaultSelectionModel |
Selects all rows. |
|
selectFirstRow() : void |
DefaultSelectionModel |
Selects the first row in the grid. |
|
selectNext([Boolean keepExisting ]) : void |
DefaultSelectionModel |
Selects the row immediately following the last selected row. |
|
selectPrevious([Boolean keepExisting ]) : void |
DefaultSelectionModel |
Selects the row that precedes the last selected row. |
|
selectRange(Number/HTMLElement startRow , Number/HTMLElement endRow , [Boolean keepExisting ]) : void |
DefaultSelectionModel |
Selects a range of rows. All rows in between startRow and endRow are also selected. |
|
selectRow(Number/HTMLElement row , [Boolean keepExisting ]) : void |
DefaultSelectionModel |
Selects a row. |
|
selectRows(Array rows , [Boolean keepExisting ]) : void |
DefaultSelectionModel |
Selects multiple rows. |
|
selectRowsById(String/Array id , [Boolean keepExisting ]) : void |
DefaultSelectionModel |
Set the selected rows by their ID(s). IDs must match what is returned by the DataModel getRowId(index). |
|
unlock() : void |
DefaultSelectionModel |
Unlock the selections |
addListener
public function addListener(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this component
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
override
: boolean(optional) If true, scope becomes the scope
Returns:
bufferedListener
public function bufferedListener(String eventName
, Function handler
, [Object scope
], [Number millis
])
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specified time-frame, only the last one actually fires.
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
millis
: Number(optional) The number of milliseconds to buffer (defaults to 250)
Returns:
clearSelections
public function clearSelections()
This method is defined by DefaultSelectionModel.
delayedListener
public function delayedListener(String eventName
, Function handler
, [Object scope
], [Number delay
])
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for events that modify the DOM and need to wait for the browser to catch up.
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
delay
: Number(optional) The number of milliseconds to delay (defaults to 1 millisecond)
Returns:
deselectRange
public function deselectRange(Number/HTMLElement startRow
, Number/HTMLElement endRow
)
Deselects a range of rows. All rows in between startRow and endRow are also deselected.
This method is defined by DefaultSelectionModel.
deselectRow
public function deselectRow(Number/HTMLElement row
)
This method is defined by DefaultSelectionModel.
fireEvent
public function fireEvent(String eventName
, Object... args
)
Fires the specified event with the passed parameters (minus the event name).
focusRow
public function focusRow(HTMLElement row
)
Deprecated. Deprecated. Tries to focus the row and scroll it into view - Use grid.scrollTo or grid.getView().focusRow() instead.
Parameters:
row
: HTMLElementThe row to focus
Returns:
This method is defined by DefaultSelectionModel.
getCount
public function getCount()
Gets the number of selected rows.
This method is defined by DefaultSelectionModel.
getSelectedRowIds
public function getSelectedRowIds()
Returns the selected row ids.
This method is defined by DefaultSelectionModel.
getSelectedRows
public function getSelectedRows()
Returns the selected rows.
This method is defined by DefaultSelectionModel.
hasSelection
public function hasSelection()
Returns True if there is a selection.
This method is defined by DefaultSelectionModel.
isLocked
public function isLocked()
Returns true if the selections are locked
This method is defined by DefaultSelectionModel.
isSelectable
public function isSelectable(HTMLElement row
)
Returns True if the specified row is selectable.
Parameters:
row
: HTMLElementThe row to check
Returns:
This method is defined by DefaultSelectionModel.
isSelected
public function isSelected(HTMLElement row
)
Returns True if the specified row is selected.
Parameters:
row
: HTMLElementThe row to check
Returns:
This method is defined by DefaultSelectionModel.
lock
public function lock()
This method is defined by DefaultSelectionModel.
on
public function on(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this element (shorthand for addListener)
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
override
: boolean(optional) If true, scope becomes the scope
Returns:
purgeListeners
public function purgeListeners()
Removes all listeners for this object
removeListener
public function removeListener(String eventName
, Function handler
, [Object scope
])
selectAll
public function selectAll()
This method is defined by DefaultSelectionModel.
selectFirstRow
public function selectFirstRow()
Selects the first row in the grid.
This method is defined by DefaultSelectionModel.
selectNext
public function selectNext([Boolean keepExisting
])
Selects the row immediately following the last selected row.
This method is defined by DefaultSelectionModel.
selectPrevious
public function selectPrevious([Boolean keepExisting
])
Selects the row that precedes the last selected row.
This method is defined by DefaultSelectionModel.
selectRange
public function selectRange(Number/HTMLElement startRow
, Number/HTMLElement endRow
, [Boolean keepExisting
])
Selects a range of rows. All rows in between startRow and endRow are also selected.
Parameters:
startRow
: Number/HTMLElementThe row or index of the first row in the range
endRow
: Number/HTMLElementThe row or index of the last row in the range
keepExisting
: Boolean(optional) True to retain existing selections
Returns:
This method is defined by DefaultSelectionModel.
selectRow
public function selectRow(Number/HTMLElement row
, [Boolean keepExisting
])
This method is defined by DefaultSelectionModel.
selectRows
public function selectRows(Array rows
, [Boolean keepExisting
])
This method is defined by DefaultSelectionModel.
selectRowsById
public function selectRowsById(String/Array id
, [Boolean keepExisting
])
Set the selected rows by their ID(s). IDs must match what is returned by the DataModel getRowId(index).
This method is defined by DefaultSelectionModel.
unlock
public function unlock()
This method is defined by DefaultSelectionModel.