GRID FEATURE
View change history
The audit log tracks row, cell, and selection changes and undo/redo transitions. Use it to inspect change history that current values alone cannot reveal.
How it works and when to use it
The log is an in-memory record with a retention limit. Services requiring long-term or legal audit records need separate server storage, access control, and retention policies.
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. Start recording
Enable logging and set retention before editing begins.
grid.auditLog = true;
grid.auditLogMax = 1000;Verify the result: Supported changes are recorded from then on. Earlier work is not reconstructed.
Example 2. Read cell changes only
Use filters to narrow the records being inspected.
const entries = await grid.getAuditLog({ kind: 'cell' });
console.log(entries);Verify the result: Inspect each record's seq, time, source, and before/after values.
Example 3. Share review records as JSON
Use JSON to preserve the structure.
const json = await grid.getAuditLogAsJson(undefined, true);
console.log(json);
// From a user download button:
await grid.exportAuditLogAsJson('order-audit.json');Verify the result: Choose a workflow for file review or app-server upload. Logs may contain sensitive previous values.
Combining features and troubleshooting
clearAuditLog() clears the local record, not persistent server records. seq values are not reused.
Older entries are removed when the retention limit is exceeded. For complete long-term records, design event collection and server storage.
Related reading
- How rows, columns, and IDs relate
- Connect results and events
- Explore in Features
The guide describes which interactions are available to try.