Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Intiyaz on Apr 21, 2009 01:52
open dhtmlx forum
Copy command

how to achieve Copy command in dhtmlx tree, current we have only Cut & Paste commands in dhtmlx
Answer posted by Alex (support) on Apr 21, 2009 04:59

There are insertNewItem and insertNewChild methods. They allow to insert new item. 

The label of the copying item can be easily got by getItemText method. 

So, you can combine insertNewChild with  getItemText - and you'll get "copy".

But please remember that item ids must be unique (the id of the new item must be different from existent in tree).