onUndo

fires when undo/redo operations are performed

void onUndo(string action,number row,number column,object value,boolean dir,object extra);
actionstringthe name of the action that is undone or redone
rownumberrow number, range start
columnnumbercolumn number, range end
valueobjectvalue that is changed
dirbooleanfalse - undo, true - redo
extraobjectany additional info

Example

webix.ui({
  view:"spreadsheet",
  toolbar:"full",
  data:spreadsheet_data,
  on:{
    onUndo(action, row, column, value, dir, extra){
      if(action == "paste"){
        //do smth
      } else if(action == "grid-change"){ //add or remove row/col
        //do smth
      }
    },
  }
});

Back to top