RadTreeView with DragAndDrop removing items

2 posts, 0 answers
  1. G.
    G. avatar
    6 posts
    Member since:
    Jul 2010

    Posted 19 Jan 2011 Link to this post

    I have a very simple question - is it possible to declaratively (in XAML) set a property that will prevent the item being dragged from being removed from the Tree (Origin)? If not, what is the recommended way to do so?

    Also, I would like to know if there is a way to prevent the item from being dragged within the TreeView (onto another Node) but allow the dragging to another control.

    Thanks,. G.
  2. Petar Mladenov
    Petar Mladenov avatar
    3152 posts

    Posted 20 Jan 2011 Link to this post

    Hi GEorgi,

    I`ve attached two sample for you demonstrating how to copy an item from one tree to another and how to prevent the removing of the item from the source tree. Basically, the RadTreeView.PreviewDragEnded event handler is used which fires on both trees and you have to made some checks.
    On the other hand, DragAndDrop functionalities can also be created with the RadDragDropManager and its events.You can also define custom Drag Cue / Arrow with them. There is an article here which is a good starting point. Feel free to ask if you need more info.

    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top