Object | +--YAHOO.ext.grid.DefaultSelectionModel
The default SelectionModel used by YAHOO.ext.grid.Grid.
It supports multiple selections and keyboard selection/navigation.
Defined in SelectionModel.js
| Field Summary | |
Object |
addListener
|
Object |
events
|
Object |
fireEvent
|
Object |
locked
|
YAHOO.util.CustomEvent |
onRowSelect
Fires when a row is selected or deselected - fireDirect sig: (this, row, isSelected) |
YAHOO.util.CustomEvent |
onSelectionChange
Fires when the selection changes on the Grid - fireDirect sig: (this, selectedRows[], selectedRowIds[]) |
Object |
removeListener
|
| Constructor Summary | |
YAHOO.ext.grid.DefaultSelectionModel
()
|
|
| Method Summary * Parameter types in italic indicate optional parameters | |
void
|
clearSelections()
Clears all selections. |
void
|
deselectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow)
Deselects a range of rows. |
void
|
deselectRow(<Number/HTMLElement> row)
Deselects a row. |
void
|
focusRow(<HTMLElement> row)
Deprecated. |
Number
|
getCount()
Gets the number of selected rows. |
Array
|
getSelectedRowIds()
Returns the selected row ids. |
Array
|
getSelectedRows()
Returns the selected rows. |
Boolean
|
hasSelection()
Returns True if there is a selection. |
Object
|
isLocked()
|
Boolean
|
isSelectable(<HTMLElement> row)
Returns True if the specified row is selectable. |
Boolean
|
isSelected(<HTMLElement> row)
Returns True if the specified row is selected. |
void
|
lock()
|
void
|
selectAll()
Selects all rows. |
void
|
selectFirstRow()
Selects the first row in the grid. |
void
|
selectNext(<Boolean> keepExisting)
Selects the row immediately following the last selected row. |
void
|
selectPrevious(<Boolean> keepExisting)
Selects the row that precedes the last selected row. |
void
|
selectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow, <Boolean> keepExisting)
Selects a range of rows. |
void
|
selectRow(<Number/HTMLElement> row, <Boolean> keepExisting)
Selects a row. |
void
|
selectRows(<Array> rows, <Boolean> keepExisting)
Selects multiple rows. |
void
|
selectRowsById(<String/Array> id, <Boolean> keepExisting)
Set the selected rows by their ID(s). |
void
|
unlock()
|
| Field Detail |
Object addListener
Object events
Object fireEvent
Object locked
YAHOO.util.CustomEvent onRowSelect
YAHOO.util.CustomEvent onSelectionChange
Object removeListener
| Constructor Detail |
YAHOO.ext.grid.DefaultSelectionModel()
| Method Detail |
void clearSelections()
void deselectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow)
startRow - The row or index of the first row in the range
endRow - The row or index of the last row in the range
void deselectRow(<Number/HTMLElement> row)
row - The row or index of the row to deselect
void focusRow(<HTMLElement> row)
row - The row to focus
Number getCount()
Array getSelectedRowIds()
Array getSelectedRows()
Boolean hasSelection()
Object isLocked()
Boolean isSelectable(<HTMLElement> row)
row - The row to check
Boolean isSelected(<HTMLElement> row)
row - The row to check
void lock()
void selectAll()
void selectFirstRow()
void selectNext(<Boolean> keepExisting)
keepExisting - (optional) True to retain existing selections
void selectPrevious(<Boolean> keepExisting)
keepExisting - (optional) True to retain existing selections
void selectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow, <Boolean> keepExisting)
startRow - The row or index of the first row in the range
endRow - The row or index of the last row in the range
keepExisting - (optional) True to retain existing selections
void selectRow(<Number/HTMLElement> row, <Boolean> keepExisting)
row - The row or index of the row to select
keepExisting - (optional) True to retain existing selections
void selectRows(<Array> rows, <Boolean> keepExisting)
rows - Array of the rows or indexes of the row to select
keepExisting - (optional) True to retain existing selections
void selectRowsById(<String/Array> id, <Boolean> keepExisting)
id - The id(s) to select
keepExisting - (optional) True to retain existing selections
void unlock()