Class YAHOO.ext.grid.DefaultSelectionModel

Object
   |
   +--YAHOO.ext.grid.DefaultSelectionModel
Direct Known Subclasses:
YAHOO.ext.grid.DisableSelectionModel, YAHOO.ext.grid.SingleSelectionModel, YAHOO.ext.grid.EditorSelectionModel

class 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

addListener

Object addListener

events

Object events

fireEvent

Object fireEvent

locked

Object locked

onRowSelect

YAHOO.util.CustomEvent onRowSelect

onSelectionChange

YAHOO.util.CustomEvent onSelectionChange

removeListener

Object removeListener

Constructor Detail

YAHOO.ext.grid.DefaultSelectionModel

YAHOO.ext.grid.DefaultSelectionModel()

Method Detail

clearSelections

void clearSelections()

deselectRange

void deselectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow)

deselectRow

void deselectRow(<Number/HTMLElement> row)

focusRow

void focusRow(<HTMLElement> row)

getCount

Number getCount()

getSelectedRowIds

Array getSelectedRowIds()

getSelectedRows

Array getSelectedRows()

hasSelection

Boolean hasSelection()

isLocked

Object isLocked()

isSelectable

Boolean isSelectable(<HTMLElement> row)

isSelected

Boolean isSelected(<HTMLElement> row)

lock

void lock()

selectAll

void selectAll()

selectFirstRow

void selectFirstRow()

selectNext

void selectNext(<Boolean> keepExisting)

selectPrevious

void selectPrevious(<Boolean> keepExisting)

selectRange

void selectRange(<Number/HTMLElement> startRow, <Number/HTMLElement> endRow, <Boolean> keepExisting)

selectRow

void selectRow(<Number/HTMLElement> row, <Boolean> keepExisting)

selectRows

void selectRows(<Array> rows, <Boolean> keepExisting)

selectRowsById

void selectRowsById(<String/Array> id, <Boolean> keepExisting)

unlock

void unlock()


Documentation generated by JSDoc on Sat Oct 14 06:07:10 2006