Check documentation for the latest version of dhtmlxSuite copy DHTMLX Docs


creates a copy of an item

void copy(string|number sid, [number tindex,object tobj,string|number tid] );
sidstring|numberid of the source item, mandatory
tindexnumbertarget index, optional
tobjobjecttarget object (target dataview), optional
tidstring|numberid which will be assigned to a newly created item, optional


// make a copy of an element
var new_id = myDataView.copy(source_id);
// make a copy at the specific position
var new_id = myDataView.copy(source_id, index);
// make a copy in the different view
var new_id = myDataView.copy(source_id, index, some_other_view);
var new_id = myDataView.copy(source_id, null , some_other_view);
// make a copy by the defined ID
myDataView.copy(source_id, null, null, target_id);
myDataView.copy(source_id, index, null, target_id);
myDataView.copy(source_id, index, some_other_view, target_id);

Back to top