Thanks.. I will try it..
What I did was to save the source of the treeA into a temp variable and after adding the node to the treeB, set back the source to the treeA.
Something like this, based on your code :
$(‘#treeA’).jqxTree({ allowDrag: true, allowDrop: true, height: ‘300px’, width: ‘220px’,
dragEnd: function (dragItem, dropItem, args, dropPosition, tree) {
var tempSource= $(‘#treeA’).jqxTree(‘source’)
switch (dropPosition) {
case “inside”:
$(‘#treeB’).jqxTree(‘addTo’, dragItem, dropItem);
break;
case “before”:
$(‘#treeB’).jqxTree(‘addBefore’, dragItem, dropItem);
break;
case “after”:
$(‘#treeB’).jqxTree(‘addAfter’, dragItem, dropItem);
break;
}
$(‘#treeA’).jqxTree({source: tempSource});
return true;
}
});