when using draganddrop i want to fix the depth of the nodes it should allow even though i set maxdepth to 1 or 2 its allowing it to add nodes below that level not sure if i am doing right and one more thing is i hav e 2 trees one is the source nodes and the other is the selected nodes but if i am trying to change the order in the selected nodes i am getting javascript error please kindly let me now if this is a known issue and any remedy is appreciated.
Regards,Raghu
Hi,
I do not understand what do you mean by fixing the depth of the nodes? You can add nodes to any level using the client side add() methods. You should control where you want to insert a node?
If you mean that you want to limit the number of nodes over which you can drop, you have to subscribe for dragEnter event and cancel the event for a certain node, that you do not wich to drop over.
About the script error we are not aware. You can post a sample web site with the page having this problem or contact developer support and give the sample to them if it contains proprietary code.
Thanks,
Lubomir
PS: When using D&D make sure you have installed the latest service release, because we are constantly improving the quality of the D&D features of the tree.
If we want to know the depth of the tree in the Javascript where a user is dropping the node what is the function we need to use can you please let me know
Thanks & Regards,
Raghu
Hi Raghu,
you can check the location of the drop in the NodeDropping event by using the following:
var dropPoint = args.get_dragDropPoint();
if (dropPoint == $IG.DragDropPoint.On) {
// you have dropped over the node in args.get_destNode();
} else if (dropPoint == $IG.DragDropPoint.After) {
// you have dropped after the node in args.get_destNode();
} else if (dropPoint == $IG.DragDropPoint.Before) {
// you have dropped before the node in args.get_destNode();
}
Hope this helps.
I forgot to add that when you have After or Before, you are doing drop insertion.
Hello Raghu,
I am following up to see if you were able to resolve the JavaScript exception you have mentioned above.
If the issue is still present, provide me with the screenshot of the error and markup of the page so I may look in to this.
Bhadresh
Please let me know to which emailid shall i send the information please.
Regards,
I have created a private support case CAS-61491-GKR9J0 in order to get more details on this issue. I will update the forum once any resolution is reached.