SMART datagrid v.1 > Classes > GridBase

[ grids ver.1.3.0]   Back  Forward

DataLudi.GridBase.undo  method

When updating the existing row or editing the appended row in grid, you can return to the previous value by updating the latest cell and move the focus to the corresponding cell as well. 

If it is not row editing in grid, it will run Undoing of data set which is connected to this grid. And, if it has actually run Undoing, onUndoStateChanged event will be fired. 

You can call canUndo to check whether Undoing is possible in the current grid or data set. 

function undo ();
Returns
Void
Code -1
    $("#btnUndo").click = function () {
        grid.canUndo() && grid.undo();
    });
See Also
Undoing Overview
undoable
redo
onUndoStateChanged
canUndo
canRedo
clearUndo
Examples
Undo & Redo