PDA

View Full Version : [CLOSED] While copying node from source treeview to destination treeview disallow it's child nodes



pawangyanwali
Apr 26, 2013, 6:40 AM
In OnBeforeDrop function, what I have done is if the node has child nodes it asks user if he wants to copy child nodes along with it too, if the user clicks on NO, then I have implement this code snippet


data.records[0].childNodes.copy=false
dropFunction.processDrop();

Then in OnDrop function, I am checking if the childnode copy property of recently added node's is set to be false and if it is false I am trying to remove them one by one by using following code snippet


if (data.records[0].childNodes.copy == undefined) {
for (var x = 0; x < data.records[0].childNodes.length; x++) {
data.records[0].getChildAt(x).destroy();
}
}

But this one is not working.

What I have also figured out that, though I have set the childnode copy property is set to false in OnBeforeDrop function, it is set as undefined in OnDrop function.

Am I missing something??? It is urgent.

Daniil
Apr 26, 2013, 7:28 PM
Related to:
http://forums.ext.net/showthread.php?21599#post107970