Does RadTreeView support DragDrop between different RadPanes?

4 posts, 0 answers
  1. Joe
    Joe avatar
    15 posts
    Member since:
    Apr 2011

    Posted 24 Jun 2011 Link to this post

    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

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 29 Jun 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joe
    Joe avatar
    15 posts
    Member since:
    Apr 2011

    Posted 29 Jun 2011 Link to this post

    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
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 01 Jul 2011 Link to this post

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