"
πŸš€ DataGridXL3 Out Now! See what's newβ†’
NOTE: DataGridXL requires a commercial license.
Create an account to download a trial version of DataGridXL to follow the steps in this tutorial.

DataGridXL β€” Docs

How Tos

Undo & Redo

DataGridXL has undo & redo functionality built-in.

All edit type user actions (and corresponding grid methods) are undoable. These are:

  • Rows: Move, Insert, Hide, Show, Freeze, Delete
  • Columns: Move, Insert, Hide, Show, Freeze, Delete, Resize
  • Cells: Edit values

The user can use common keyboard shortcuts to trigger undo and redo.

It's also possible to trigger and undo or redo by code:

javascript
grid.undo();
grid.redo();

Advanced: Undo Manager

DataGridXL has an undoManager that holds an array of previous commands: grid.undoManager.commands. This property could be useful to you should you want to add an HTML element that displays command history.