Is there any way to access information about where in the RadTreeView an item has been dropped?

2 posts, 0 answers
  1. Praveen
    Praveen avatar
    5 posts
    Member since:
    Apr 2015

    Posted 01 Dec 2015 Link to this post

    I have an existing RadTreeView, and would like to allow users to drop the items at another location within the tree .  All I need to capture is the drop target details. It seems to be available within "DragEventArgs.Data" property but this seems to be inaccessible through code.  It has the type "Telerik.Windows.DragDrop.Behaviors.DragPayload.FullTrustPayload" and I can't access it.

    Is there any way to access information about where in the RadTreeView an item has been dropped?

    TIA

  2. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 03 Dec 2015 Link to this post

    Hi Praveen,

    I guess you mean the DragEventArgs of the DragDropManager's Drop event. If so, you can get the object that holds the information about the dragged treeview item from the TreeViewDragDropOptions object.
    var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
    The options' object also contains information about the drop target.

    In addition you can take a look at the Drag and Drop help article which describes the drag/drop functionality of RadTreeView. Also, you can take a look at the DragDropPayloadManager article that describes how to extract the DragEventArgs.Data object.

    I hope this information is useful.

    Regards,
    Martin
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top