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

2 posts, 0 answers
  1. steve
    steve avatar
    1 posts
    Member since:
    Sep 2010

    Posted 08 Sep 2010 Link to this post


    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.

  2. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 14 Sep 2010 Link to this post

    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
Back to Top