Class DataModelAbstract

An object which provides the data for a data grid.

Notes

If the predefined data models are insufficient for a particular use case, a custom model can be defined which derives from this class.

Hierarchy

Constructors

Properties

_changed: Signal<DataModel, ChangedArgs> = ...

Accessors

Methods

  • Get the data value for a cell in the data model.

    Returns

    The data value for the specified cell.

    Notes

    The returned data should be treated as immutable.

    This method is called often, and so should be efficient.

    Parameters

    • region: CellRegion

      The cell region of interest.

    • row: number

      The row index of the cell of interest.

    • column: number

      The column index of the cell of interest.

    Returns any

  • Get the metadata for a cell in the data model.

    Returns

    The metadata for the specified cell.

    Notes

    The returned metadata should be treated as immutable.

    This method is called often, and so should be efficient.

    The default implementation returns {}.

    Parameters

    • region: CellRegion

      The cell region of interest.

    • row: number

      The row index of the cell of interest.

    • column: number

      The column index of the cell of interest.

    Returns Metadata

Generated using TypeDoc