DHTMLX Docs & Samples Explorer

copy (sid, tindex, tobj, tid)

Required library edition: This method works with any edition of DHTMLX library

Required library file: dhtmlxdataview.js creates a copy of item

  • sid - id of source item, mandatory
  • tindex - target index, optional
  • tobj - target object ( target dataview ), optional
  • tid - id which will be assinged to newly created item, optional
//make a copy of element
   var new_id = view.copy(source_id);
//make a copy at specific position
   var new_id = view.copy(source_id, index);
//make a copy in different view
   var new_id = view.copy(source_id, index, some_other_view);
   //or
   var new_id = view.copy(source_id, null , some_other_view);
 
//make a copy with defined ID
   view.copy(source_id, null, null, target_id);
   //or
   view.copy(source_id, index, null, target_id);
   //or
   view.copy(source_id, index, some_other_view, target_id);