Click here to Skip to main content
15,888,300 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm using kendo UI. i want to create two trees with drag and drop possible from 1 tree to another.It is required that the parent and child of 1 tree remain fixed.only subchild can be moved.
Posted
Comments
Sinisa Hajnal 12-Jan-16 4:45am    
What have you tried?
Member 12249738 25-Jan-16 4:11am    
I'm using below code having two treeviews, left and right. I want to restrict the movement of parent nodes. So that they cannot be moved. And that the child nodes can be moved only to the parent nodes but not to other child nodes.


<script>
$("#treeview-left").kendoTreeView({
dragAndDrop: true,
dataSource: [
{ text: "Furniture", expanded: true, items: [
{ text: "Tables & Chairs" },
{ text: "Sofas" },
{ text: "Occasional Furniture" }
]
},
{ text: "Decor", items: [
{ text: "Bed Linen" },
{ text: "Curtains & Blinds" },
{ text: "Carpets" }
]
}
]
});

$("#treeview-right").kendoTreeView({
dragAndDrop: true,
dataSource: [
{ text: "Storage", expanded: true, items: [
{ text: "Wall Shelving" },
{ text: "Floor Shelving" },
{ text: "Kids Storage" }
]
},
{ text: "Lights", items: [
{ text: "Ceiling" },
{ text: "Table" },
{ text: "Floor" }
]
}
]
});

<style>
#treeview-left,
#treeview-right
{
overflow: visible;
}
</style>
</div>

1 solution

 
Share this answer
 
Comments
Member 12249738 14-Jan-16 5:32am    
thanx for the help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900