SMART datagrid v.1 > Classes > GridBase

[ grids ver.1.3.0]   Back  Forward

DataLudi.GridBase.clearUndo  method

Empty and initialize grid Undo Stack

If specify clearData parameter as true, it will also empty Undo stack of DataSet being connected to this grid. 

If change undoable or DataSet.undoable instead of calling this function, it will internally empty and initialize the stack. And, if call this to empty stacks when the stack of grid or data set has not been emptied actually, onUndoStateChanged event will be fired. 

function clearUndo (clearData: Boolean);
Returns
Void
Parameters
clearData - Boolean.
If it is true, it will initialize Undo stack of DataSet which has been connected to the grid at the same time.
Code -1
    $("#btnClear").click = function () {
        grid.clearUndo(true);
    };
See Also
Undoing Overview
undoable
onUndoStateChanged
canRedo
canUndo
undo
redo
Examples
Undo & Redo