new DataModel()
Methods
getCell(config, declaredRendererName) → {CellRenderer}
Parameters:
Name | Type | Description |
---|---|---|
config |
object | |
declaredRendererName |
string | The proposed cell renderer name (form the render properties). |
Returns:
- Type
- CellRenderer
getCellEditorAt(columnIndex, rowIndex, declaredEditorName, cellEvent) → {undefined|CellEditor}
Instantiate a new cell editor.
The application developer may override this method to:
- Instantiate and return an arbitrary cell editor. The generic implementation here simply returns the declared cell editor. This is
undefined
when there was no such declaration, or if the named cell editor was not registered. - Return
undefined
for no cell editor at all. The cell will not be editable. - Set properties on the instance by passing them in the
options
object. These are applied to the new cell editor object after instantiation but before rendering. - Manipulate the cell editor object (including its DOM elements) after rendering but before DOM insertion.
Overriding this method with a null function (that always returns undefined
) will have the effect of making all cells uneditable.
Parameters:
Name | Type | Description |
---|---|---|
columnIndex |
number | Absolute column index. I.e., the position of the column in the data source's original |
rowIndex |
number | Row index of the data row in the current list of rows, regardless of vertical scroll position, offset by the number of header rows (all the rows above the first data row including the filter row). I.e., after subtracting out the number of header rows, this is the position of the data row in the |
declaredEditorName |
string | The proposed cell editor name (from the render properties). |
cellEvent |
CellEvent | All enumerable properties of this object will be copied to the new cell editor object for two purposes:
Note that the |
Returns:
An object instantiated from the registered cell editor constructor named in declaredEditorName
. A falsy return means the cell is not editable because the declaredEditorName
was not registered.
- Type
- undefined | CellEditor