copies an item to the same or another object
sid | id | the id of the copied object |
tindex | number | the index of the copy |
tobj | object | the object that an item is copied to |
details | object | extra parameters for copying |
gridb.attachEvent("onBeforeDrop", function(context, ev){
for (var i=0; i< context.source.length; i++){
context.from.copy(context.source[i],context.start,this,{newId:webix.uid()});
}
return false;
});
In the sample above:
Details object can contain the next properties:
details = {};
details.newId = "123"; //new id for moved item
Note that in case newId is not defined, the new ID will be the same as the ID of the source item (sid), which is not desirable during moving within one and the same component.
Back to top