Hello
Can anyone help and explain me why Undo / Redo is not working for me?
I’m trying since hours and happens nothing
I included these 2 functions in DHTMLX ToolBar.
<script src="../dhtmlx/Grid/codebase/dhtmlxcommon.js"></script>
<script src="../dhtmlx/Grid/codebase/dhtmlxgrid.js"></script>
<script src="../dhtmlx/Grid/codebase/dhtmlxgridcell.js"></script>
<script src="../dhtmlx/Grid/codebase/ext/dhtmlxgrid_undo.js"></script>
var Toolbar = new dhtmlXToolbarObject("toolbarbox", "dhx_black");
Toolbar.setIconsPath("../images/icons/");
Toolbar.setSkin('dhx_blue');
Toolbar.addButton("speichern", 0, "Speichern", "save.gif", "save_dis.gif");
Toolbar.addButton("new", 1, "neuer Vorgang", "new.gif", "new_dis.gif");
//Toolbar.addButton("reset", 2, "Zurück setzen", "back.gif", "back_dis.gif");
Toolbar.addButton("undo", 3, "Rückgängig", "redo.gif", "redo_dis.png");
Toolbar.addButton("redo", 4, "Wiederholen", "undo.gif", "undo_dis.png");
Toolbar.addSeparator("s1", 1);
Toolbar.addSeparator("s1", 4);
Toolbar.attachEvent("onClick", function(id) { Button_laden(id,1,1); });
function Button_laden(button,tab,grid) {
switch (button) {
case "speichern": DataProcessor.sendData(); break;
//case "reset": Grid[grid].clearAll(); Grid[grid].loadXML("../dhtmlx/Data/XML/grid.php?id=1&t="+tab); break;
case "new": Grid[grid].clearAll(); Grid[grid].loadXML("../dhtmlx/Data/XML/grid.php?id=1&t="+tab); break;
case "undo": Grid[grid].doUndo(); break;
case "redo": Grid[grid].doRedo(); break;
}
};
Thank you in advance
Best regards
Oli