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

RadTreeView + QueryableEntityCollectionView + Drag & Drop

1 Answer 111 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 31 May 2012, 02:42 PM
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?
Thanks!

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 05 Jun 2012, 10:20 AM
Hello,

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,
Hristo
the Telerik team

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

Tags
TreeView
Asked by
Randy
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or