Drag and Drop *onto* RadTreeViewItem

3 posts, 0 answers
  1. Matt Kalinowski
    Matt Kalinowski avatar
    2 posts
    Member since:
    May 2010

    Posted 28 Jun 2010 Link to this post


    I'm attempting to drag one RadTreeViewItem from one RadTreeView *onto* another RadTreeViewItem in another RadTreeView.  I can drag/drop under/above the mode perfectly fine, but what I'd really like to do is drag/drop on top of the receiving node (because I have a custom Item Container for each, it is more intuitive with the design to drop on top of instead of just above/below).  I have tried messing with AllowDrop (both in the main control and the ItemContainer data template) and catching the DropInfo and DropQuery events, but no luck so far.  I would imagine this is technically possible to do, but I haven't found a good solution yet.  Any help would be greatly appreciated.


  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 01 Jul 2010 Link to this post

    Hi Matt Kalinowski,

    I am not sure what exactly is your scenario. So I cannot be entirely sure what is causing the issue.

    However, if you have a hierarchy of Companies for example. And each company has a collection of Departments, where for every department is defined a collection of employees. Now in this scenario, if you create two trees displaying such hierarchies, you will notice that you will only be able to drop employees into departments and departments into companies. In other words if the destination data item doesn't contain a collection of items, which type is the same as the type of the dragged item, then the drop operation is not allowed.

    If your case is similar, you will need to make sure that the definition of the items that you want to drop onto allow the operation.

    I prepared a sample project illustrating this scenario. In the example all data items inherit one common class thus allowing all "drop onto" operations between and inside the trees.

    Please take a look at the project and let me know if it helps. Also if your scenario requires a different approach, can you please elaborate on it. Thank you in advance.

    Tina Stancheva
    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. FantasmaWeb
    FantasmaWeb avatar
    9 posts
    Member since:
    Jun 2006

    Posted 03 Oct 2011 Link to this post


        I have some problem, cause I want to make the drag and drop between two Trees, but I want to  make some restric, so I Used the

    RadDragAndDropManager , but the DropQuery event doesn't fire, my tow trees have the property IsDragDropEnabled="True" 





Back to Top