creates a copy of an item
sid | string|number | id of the source item, mandatory |
tindex | number | target index, optional |
tobj | object | target object (target list), optional |
tid | string|number | id which will be assigned to a newly created item, optional |
// make a copy of an element
var new_id = myList.copy(source_id);
// make a copy at the specific position
var new_id = myList.copy(source_id, index);
// make a copy in the different view
var new_id = myList.copy(source_id, index, some_other_view);
//or
var new_id = myList.copy(source_id, null , some_other_view);
// make a copy by the defined ID
myList.copy(source_id, null, null, target_id);
//or
myList.copy(source_id, index, null, target_id);
//or
myList.copy(source_id, index, some_other_view, target_id);
Back to top