Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by nik on Feb 20, 2009 09:24
open dhtmlx forum
Keyboard shortcuts & undo/redo for dhtmlxTree

I am evaluating the dhtmlxTree for my project.
I am looking to create a dynamic tree based on multi-page documents and let the user rearrange, cut, copy, past and/or sort the documents and the pages contained in them.

1) Does the dhtmlxTree have any other keyboard shortcuts out of the box (other than up,down, left, right, call) ?
Like ctrl+c, ctrl+v, ctrl+x etc.

2) Does it have any undo/redo capabilities ?

thanks,
Nik
Answer posted by Support on Feb 23, 2009 05:59
>>Like ctrl+c, ctrl+v, ctrl+x etc.
Nope, but it has built in method doCut, doCopy, doPaste which was designed for exactly the same use-case and "onKeyPress" event ( occurs only if enableKeyboardNavigation used )

tree.attachEvent("onKeyPressed",function(code, event){
    if (event.keyCode==some && event.ctrlKey ) tree.doCopy();
    return true;
});

>>2) Does it have any undo/redo capabilities ?
There is no built in undo-redo functionality. Grid provides set of events for all common operation, so in theory it possible to maintain list of modification and do undo operation through custom code.