This is a migrated thread and some comments may be shown as answers.

TreeView, how to stop certain nodes from been dragged into the root

1 Answer 67 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
steve
Top achievements
Rank 1
steve asked on 09 Sep 2010, 04:47 AM
Hi,

i have a treeview in my app, and its databoud to data using a HierarchicalDataTemplate
how can i stop certian flagged nodes from been dragged into the root of the treeview?
i need them to be draggable to anyother node, but not the root.

cheers

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 14 Sep 2010, 01:29 PM
Hello Steve,

You can use the IsDropAllowed property of RadTreeViewItem. In a data-bound scenario you have to use container bindings to set the IsDropAllowed property. More information on hierarchical data and container bindings you can find here. I've also attached a sample project that demonstrates one possible solution to your scenario. Have a look at it and let me know if you have further questions or comments.

All the best,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
steve
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or