SMART datagrid v.1 > Classes > DataSet
DataLudi.DataSet.canUndo method
When undoable is true, if the changed history which can restore by calling methods of data set exists, it will return true.
You can check whether Redoing is possible by canRedo method.
function canUndo (): Boolean;
- Returns
- Boolean
- Note
- In grid application, it manages Undo stack of data set through the property or methods of Grid connected to this data set rather than data set. You can also call GridBase.canUndo rather than this function to check whether Undoing of data set is possible.
Code -1
$('#undo').click(function () {
if (dataset.canUndo()) {
dataset.undo();
}
}
- See Also
- Undoing Overview
- undoable
- canRedo
- undo
- redo
- clearUndo
- onUndoStateChanged
- canUndo
- canRedo
- Examples
- Undo & Redo