All actions to do operations for worksheet is necessary to be performed via workbook (the control itself), the target worksheet of actions is current active (displaying) worksheet.
Three actions is performed to do operations for different worksheet, the perform order will be kept in order to undo and redo actions by same order between different worksheet.
For undo, actions will be undid by reverse order.
Do action via workbook (control itself)
// select a worksheet
grid.CurrentWorksheet = mysheet;
// create action (set cell 'A1' to 100)
var action = new SetCellDataAction("A1", 100);
// do action
grid.DoAction(action);
Undo and redo last action
After undoing and redoing an action, the CurrentWorksheet will be changed to the target worksheet of performed action automatically.
grid.Undo(); // undo
grid.Redo(); // redo