SYIDAX / DATA GRID

Data updates

Supports full data replacement and ID-based transactions.

Get started
Data updatesSample order data
120 rows
Loading Grid…
Latest result

After resetting, inspect ORD-0001: quantity 10 and total 1,200.

View code
Current preview

Usage guide

#

Changing an order quantity does not require recreating the whole table. Pass the order ID and new values to update that row.

Try it yourself

  1. Inspect the original value

    After resetting, inspect ORD-0001: quantity 10 and total 1,200.

  2. Click Sample update

    Sample update above the table increases the first order's quantity by 10. After one click, verify quantity 20 and total 2,400.

  3. Read the processing result

    Inspect the applyTransaction() result below the table. Each click adds another 10, and Undo reverses changes.

Expected results

The target order's quantity and calculated total change together. Its unchanged order ID continues to identify it.

This example updates browser sample data. Connect actual server saving separately. Pass a new rowData array to display a complete new query result.

Useful terms

applyTransaction
A method passing rows to add, update, and remove together to the Grid.
getRowId
A function returning each row's unique ID so the same row can be found after sorting changes its position.

Key API examples

Application code that references the registered Grid element as grid.

// getRowId identifies the same order.
const row = grid.rowData[0];
if (row) {
  const result = await grid.applyTransaction({
    update: [{ ...row, quantity: Number(row.quantity) + 10 }]
  });
  console.log(result);
}

API reference

#

Key properties

Attribute / PropertyType / DefaultDescription
rowData
GridData[]Default: undefinedRow data — each entry is a plain object keyed by `ColumnDef.field`. Mutable so managed row drag can reassign a reordered array; the host observes the new order via the `rowMoved` event.
columnDefs
Array<ColumnDef | GridColumnGroupDef>Default: undefinedColumn definitions in the standard shape. entries may also be nested groups (`{ headerName, children: [...] }`) — leaves drive every existing behaviour; groups add multi-level header rows.
defaultColDef
Partial<ColumnDef>Default: undefinedDefaults merged into every column def (right side wins).
Events2
EventsDetail typeDescription
GridRowDataChangedDetailFires after `applyTransaction` resolves its row diff.
GridCellValueChangedDetailFires once per changed cell on every `applyTransaction` update (AG Grid parity).
Methods1
Method / ArgumentsReturn typeDescription
transaction: RowDataTransaction<GridRow>, label?: string, opts?: { source?: GridEditSource; origin?: unknown }
Promise<ApplyRowTransactionResult<GridRow>>Apply a row-data transaction and emit its diff.
ColumnDef3
ColumnDefType / RequiredDescription
GridFieldPath<TData>RequiredKey on the row object — used to read the cell value when no `valueGetter`.
stringOptionalStable public id. Falls back to `field`.
stringOptionalHeader text. Falls back to `field` when omitted.