Class MutableDataModelAbstract

An object which provides the mutable data for a data grid.

Notes

This object is an extension to DataModel and it only adds ability to change data for cells.

Hierarchy (view full)

Constructors

Accessors

Methods

  • Get the column count for a region in the data model.

    Parameters

    Returns number

    • The column count for the region.

    Notes

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

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

    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

    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.

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

    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

    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 {}.

  • Get the row count for a region in the data model.

    Parameters

    • region: RowRegion

      The row region of interest.

    Returns number

    • The row count for the region.

    Notes

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

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

    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.

    • value: unknown

    Returns boolean

    true if succeeds, false otherwise.