I need the tree to behave in such a way that when a user drags a leaf and tries to order it, the leaf can be ordered only within its parent. Can any one help me out in this...
eg:
fruits and vegetables(Root)
------\Fruits(Parent1)
---------\Orange (Leaf1.1)
---------\Apple (Leaf1.2)
---------\Dragon Fruit (Leaf1.3)
------\Veggie(Parent2)
---------\Potato (Leaf1)
---------\Beetroot (Leaf2)
---------\Yam (Leaf3)
The ordering is allowed only between the fruits or vegetables. Leaf's 1.1,1.2,1.3
can be sorted inside parent 1 only. Thanks.
You have to by code only. In handler function of drag, check if the type is vegetable or fruit and parent's type is same. If both are not same, do nothing and call e.stopEvent().
--Sridhar