DHTMLX Docs & Samples Explorer

Undo|Redo Functionality

dhtmlxgrid_undo.js required

Extension allows undo|redo functionality. All edit actions made by user will be saved in unlimited undo history. However, modifications caused by API calls will not be stored in the history.

Enabling/Disabling Undo|Redo

There are methods responsible for enabling/disabling undo|redo functionality in the grid:

        grid.enableUndoRedo();
        grid.disableUndoRedo();

Executing Undo|Redo

The user can do undo|redo from script in the following way:

        grid.doUndo();
        grid.doRedo();

Getting Undo|Redo

The following methods can be used to get length of available Undo|Redo operations in the grid:

     grid.getUndo().length;
     grid.getRedo().length;