GRID FEATURE · PRO

Batch editing

Batch editing stages changes to multiple cells for a single commit or cancellation. Distinguish staged values from committed rowData to make the Save action clear.

How it works and when to use it

Start batch editing, then pass a row ID, column ID, and new value to stageBatchCell. Missing targets and noneditable columns may not be applied.

Using this feature in a product requires the Pro package and a valid license. Matching setting names do not enable Pro features in Community.

In the code, grid is the Grid element prepared in the installation chapter. Check each example's data and settings, and implement the app functions and server endpoints for your project.

Example 1. Stage edits to two orders

Prepare changes until the user clicks Save.

javascript
await grid.startBatchEdit();
await grid.stageBatchCell('ORD-0001', 'quantity', 25);
await grid.stageBatchCell('ORD-0002', 'quantity', 50);
console.log(await grid.getPendingBatchCells());

Verify the result: Read the list of staged changes. Staging alone does not mean a server save has completed.

Example 2. Review and commit

Inspect the batch result during the Save action.

javascript
console.log(await grid.commitBatchEdit());
console.log(await grid.isBatchEditing());

Verify the result: Read the application report for validation and permission results before continuing with server saving. Also check whether the session remains active.

Example 3. Cancel all changes and show built-in tools

Discard staged batch changes when users cancel. You can also display the built-in tools.

javascript
await grid.cancelBatchEdit();
grid.batchEditToolbar = true;

Verify the result: Uncommitted changes are cancelled, preserving the values from before the commit. This does not erase previously committed operations.

Combining features and troubleshooting

New server data arriving during a batch may conflict with the editing baseline. Choose a policy to temporarily buffer updates or explain conflicts.

A batch commit is not a server transaction. If server saving fails, offer retry and revert choices.

Related reading