UndoManager
Description
The UndoManager maintains a history of user actions for undo and redo functionality.
NOTE: In most cases, using theundoandredomethods on theDataGridXLinstance directly is preferred.
Usage
Your DataGridXL instance contains a property undoManager.
javascript
// create DataGridXL instance
const grid = new DataGridXL(...);
// work with the UndoManager instance
grid.undoManager.getCommands();NOTE: You don't need to create an UndoManager instance yourself — it is provided by the grid automatically.Methods
add(command)Add command
Arguments
command
functionCommand functionclear()Clear all commands
getCommands(): arrayGet commands
Returns
arrayArray of commandsgetIndex(): numberGet index
Returns
numberIndexhasRedo(): booleanCheck if has redo
Returns
booleanhasUndo(): booleanCheck if has undo
Returns
booleanredo()Redo last command
setCallback(callbackFunction)Set callback function
Arguments
callbackFunction
functionCallback functionsetLimit(limit)Set a limit
Arguments
limit
numberLimitundo()Undo last command
No generated events found for
UndoManager.