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

Does RadTreeView support DragDrop between different RadPanes?

3 Answers 55 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 24 Jun 2011, 06:30 PM
I have two RadPanes, in separate Prism regions, in my WPF MVVM application.
I added RadTreeViews in each RadPane.  I enabled the DragDrop on each of them.
When I test the DragDrop I see the "No" icon (red circle with a slash) and I am not able to drop the item.

Is there a known inability to DragDrop RadTreeViewItems between different RadPanes?

Do the data bound .NET objects have to be the same types?  The Telerik documentation is very thin on such details.
I am wondering if I have different object types in the backing lists does that matter?
Isn't each ultimately wrapped as a RadTreeViewItem?

The Telerik DragDrop example has the RadTreeViewItems created in line, in the XAML, and they only contain an image.
I need a more detailed example across RadPanes and using sorted CollectionViewSources.
The documentation does not go at all this deep.

Can someone help me?
Thanks, Joe

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 29 Jun 2011, 05:19 PM
Hello Joe,

The RadTreeViewItems are containers, actually a visual objects , representations of your data(the business objects). When moving a RadTreeViewItem from a source tree to a destination tree, the destination Item`s children collection type ( the collection in which you want to drop the dragged item) should be the same as the dragged item`s type. This requirement is mandatory.
The DragAndDrop operation between two bound RadTreeViews  in two different RadPanes should work "out of the box". If you need to perform custom DragAndDrop behavior , you can try the RadDragAndDropManager and its events.
Please let us know if you need further assistance on this.

Regards,
Petar Mladenov
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
0
Joe
Top achievements
Rank 1
answered on 29 Jun 2011, 07:16 PM
Okay, thank you Petar, I will try this.
The DragDrop demo simply has simply this:

<telerik:RadTreeViewItem Header="Junk E-mails" DefaultImageSrc="../Images/TreeView/Outlook/junk.png" />

where the TreeViewItem object type is nothing more than an empty TreeViewItem with a header and an image.
It is not a very good example - just a demo. 
I wish the demo showed MVVM with ObservableCollections of a class bound to TreeViews in different RadPanes.
I will change my solution and report back to you with the results.

Thank you, Joe
0
Petar Mladenov
Telerik team
answered on 01 Jul 2011, 03:37 PM
Hi Joe,

I prepared a sample for you that demonstrates a DragAndDrop operations between two RadTreeViews located in different RadPanes. Could you please give it a try and let us know if it satisfies you ?

Regards,
Petar Mladenov
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
Joe
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Joe
Top achievements
Rank 1
Share this question
or