Class TableCellUpdateEvent

A new value for one cell – the input of TableApi.updateCells. The value is written into the area model; if the cell is visible, only this cell is redrawn. cssClasses are applied to the current drawing of the cell (e.g. a short "flash"); permanent colours belong into the model (AreaModelIf.getCustomClassesAt).

Example

tableApi.updateCells([
new TableCellUpdateEvent("body", row, 2, price, { "tick-up": up, "tick-down": !up }),
new TableCellUpdateEvent("body", row, 4, volume)
]);

See

Training: Live data without rebuilding the table

Hierarchy

  • TableCellUpdateEvent

Implements

Constructors

Properties

area: AreaIdent

Represents an area identifier ("header" | "body" | "footer"), which defines the part of the table.

columnIndex: number

Represents the index of a column in a data table.

cssClasses: {
    [key: string]: boolean;
} = {}

Represents a collection of CSS classes with their corresponding boolean values. For each key-value pair of the object with a truthy value the corresponding key is used as a class name. For each key-value pair of the object with a falsy value the corresponding key will be removed from the class list of the cell div (dom node). Example: { low: val >= 0 && val <=5, medium: val > 5 && val <= 10, high: val > 10 }

Type declaration

  • [key: string]: boolean
rowIndex: number

Represents the index of a row of the table.

value: any

The value can be any data type. It can store a string, number, boolean, object, function, or null. It is a flexible variable that can hold any value.

This valie will be set to the area model for the cell (rowIndex, columnIndex).