RadTreeView + QueryableEntityCollectionView + Drag & Drop

2 posts, 0 answers
  1. Randy
    Randy avatar
    5 posts
    Member since:
    Dec 2007

    Posted 31 May 2012 Link to this post

    I'm working on a project where I have a large amount of data stored in a database organized into a tree. I'm using the EntityFramework, so I'm using the QueryableEntityCollectionView to filter my data and a RadTreeView to display it.

    However, I also need support for drag & drop to add/move/delete items. By default, the RadTreeView won't let me drop into this tree as it is. If it was an IList or an ObservableCollection, it will let me, but I need to be able to refresh/filter the visible nodes in the tree.

    Is there a way to override the d&d support in RadTreeView to allow drops, and run custom code on drop complete?

    I did see this post (http://www.telerik.com/community/forums/silverlight/treeview/use-drag-and-drop-to-rearrange-items-and-then-persist-order-back-to-database.aspx) but it's for silverlight and I don't think the WCF side is needed for a WPF + EF application.

    Any advice?
  2. Hristo
    Hristo avatar
    352 posts

    Posted 05 Jun 2012 Link to this post


    You could subscribe to the DropInfo event and override the values controlling when the drop is allowed. Also You could attach a handler to the DragEndedEvent of the TreeView and perform the items moving by yourself.

    Regarding the post you saw, I think it will not be much of help to you. Also, using WCF is not needed when dealing with WPF + EF.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top