undo();
The undo method cancels all changes in the table.
To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component) and with the loaded table in the express report workspace.
Set and show new value of table cell, next undo the changes. Show cell value after undoing the changes, also show name of express report document and ID of the service used to work with express report:
// Get express report table var grid = expressBox.getDataView().getGridView(); // Get table var tabSheet = grid.getInstance(); // Set and output a new value for a cell with the address [3, 1] tabSheet.setCellValue(90, 3, 1); console.log("New cell value [3, 1]: " + tabSheet.getCellValue(3, 1)); // Undo pending changes grid.undo(); // Output the cell value after undoing changes console.log("Value of the cell [3, 1] after undoing changes: " + tabSheet.getCellValue(3, 1)); // Output express report document name console.log("Express report document name: " + grid.getSource().getName()); // Output identifier of the service used to work with express reports console.log("Identifier of the service used to work with express reports: " + grid.getSrv().getId());
As the result the browser console displays cell value before and after the changes are canceled, name of express report document, and ID of the service for working with express report:
New value of the cell [3, 1]: 90
Value of the cell [3, 1] after changes are canceled: 5
Name of express report document: GridView
ID of the service used to work with express report: EaxMdService434
See also: