Object | +--YAHOO.ext.grid.AbstractDataModel
This abstract class provides default implementations of the events required by the Grid.
It takes care of the creating the CustomEvents and provides some convenient methods for firing the events.
Defined in AbstractDataModel.js
| Field Summary | |
Object |
addListener
|
Object |
events
|
Object |
fireEvent
|
YAHOO.util.CustomEvent |
onCellUpdated
Fires when a cell is updated - fireDirect sig: (this, rowIndex, columnIndex) |
YAHOO.util.CustomEvent |
onRowsDeleted
Fires when rows are deleted - fireDirect sig: (this, firstRowIndex, lastRowIndex) |
YAHOO.util.CustomEvent |
onRowsInserted
Fires when a rows are inserted - fireDirect sig: (this, firstRowIndex, lastRowIndex) |
YAHOO.util.CustomEvent |
onRowsSorted
Fires when a sort has reordered the rows - fireDirect sig: (this, sortColumnIndex, sortDirection = 'ASC' or 'DESC') |
YAHOO.util.CustomEvent |
onRowsUpdated
Fires when a rows are updated - fireDirect sig: (this, firstRowIndex, lastRowIndex) |
YAHOO.util.CustomEvent |
onTableDataChanged
Fires when all data needs to be revalidated - fireDirect sig: (thisd) |
Object |
removeListener
|
| Constructor Summary | |
YAHOO.ext.grid.AbstractDataModel
()
|
|
| Method Summary * Parameter types in italic indicate optional parameters | |
void
|
fireCellUpdated(row, col)
Notifies listeners that the value of the cell at [row, col] has been updated |
void
|
fireRowsDeleted(firstRow, lastRow)
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been deleted |
void
|
fireRowsInserted(firstRow, lastRow)
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been inserted |
void
|
fireRowsSorted(sortColumnIndex, sortDir, noRefresh)
Notifies listeners that rows have been sorted and any indexes may be invalid |
void
|
fireRowsUpdated(firstRow, lastRow)
Notifies listeners that rows in the range [firstRow, lastRow], inclusive, have been updated |
void
|
fireTableDataChanged()
Notifies listeners that all data for the grid may have changed - use as a last resort. |
void
|
getRowCount()
Empty interface method - Classes which extend AbstractDataModel should implement this method. |
void
|
getRowId(rowIndex)
Empty interface method - Classes which extend AbstractDataModel should implement this method. |
Object
|
getSortState()
Interface method to supply the view with info regarding the Grid's current sort state - if overridden, this should return an object like this {YAHOO.ext.grid.AbstractDataModel.prototype.column = this;.sortColumn, YAHOO.ext.grid.AbstractDataModel.prototype.direction = this;.sortDir}. |
Object
|
getTotalRowCount()
Empty interface method - Classes which extend AbstractDataModel should implement this method to support virtual row counts. |
void
|
getValueAt(rowIndex, colIndex)
Empty interface method - Classes which extend AbstractDataModel should implement this method. |
Object
|
isPaged()
|
void
|
setValueAt(value, rowIndex, colIndex)
Empty interface method - Classes which extend AbstractDataModel should implement this method. |
void
|
sort(columnModel, columnIndex, direction, suppressEvent)
Empty interface method - Classes which extend AbstractDataModel should implement this method. |
| Field Detail |
Object addListener
Object events
Object fireEvent
YAHOO.util.CustomEvent onCellUpdated
YAHOO.util.CustomEvent onRowsDeleted
YAHOO.util.CustomEvent onRowsInserted
YAHOO.util.CustomEvent onRowsSorted
YAHOO.util.CustomEvent onRowsUpdated
YAHOO.util.CustomEvent onTableDataChanged
Object removeListener
| Constructor Detail |
YAHOO.ext.grid.AbstractDataModel()
| Method Detail |
void fireCellUpdated(row, col)
void fireRowsDeleted(firstRow, lastRow)
void fireRowsInserted(firstRow, lastRow)
void fireRowsSorted(sortColumnIndex, sortDir, noRefresh)
void fireRowsUpdated(firstRow, lastRow)
void fireTableDataChanged()
void getRowCount()
void getRowId(rowIndex)
Object getSortState()
Object getTotalRowCount()
void getValueAt(rowIndex, colIndex)
Object isPaged()
void setValueAt(value, rowIndex, colIndex)
void sort(columnModel, columnIndex, direction, suppressEvent)