Reported by EventListenerIf.onModelChanged after cells were edited: the row and column indices of the changed cells. The new values are already written into the area model.

Since 1.1.96 the event comes once per change – an edit, a fill (fill handle, Ctrl/⌘+D), a commit of a batch edit or TableApi.applyCellChanges – with all cells, and changes tells old and new values.

Example

override onModelChanged(evt: GeModelChangeEvent): void {
for (const { rowIndex } of evt.cells) {
const order = tableModel.getBodyModel().getRowByIndex(rowIndex) as Order;
order.total = order.quantity * order.price; // recalculate derived values
}
tableApi.repaint();
}

See

Training: Inline editing

Hierarchy

  • GeModelChangeEvent

Constructors

Properties

cells: GeCellIndices[]
changes?: CellChangeIf<any>[]

The changed cells with row object, property, old and new value (since 1.1.96; undefined for events created by own code with the old constructor).

What changed the cells: "edit", "fill", "commit" or "api" (since 1.1.96).

Methods