Drop item only outside of TreeView

3 posts, 1 answers
  1. Ivan
    Ivan avatar
    43 posts
    Member since:
    Nov 2013

    Posted 04 Dec 2013 Link to this post

    Hello,

    i would like to only enable drag/drop effects outside of the TreeView. That means, when i drag the TreeViewItem inside TreeView, the DragDropEffects should be None, when the mouse is out of the TreeView, drop effects will be allowed.
    1). I have tried the RadTreeView_ItemPrepared and set the PreparedItem.AllowDrop = false. But i can also drag a TreeViewItem and drop it after last TreeViewItem.
    2). I tried to set DropPosition property of TreeViewDragDropOptions. But it could only be set to Inside :(

    Any idea? Thanks.

    Ivan
  2. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 06 Dec 2013 Link to this post

    Hi Ivan,

    To achieve this custom requirement you can use the events of the DragDropManager. You can explore our DragDrop section in the RadTreeView's online help. Its last article demonstrates how to deny a drop at certain places in the Tree. We believe it can help you proceed further.

    Regards,
    Petar Mladenov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ivan
    Ivan avatar
    43 posts
    Member since:
    Nov 2013

    Posted 06 Dec 2013 Link to this post

    Hi Petar,

    thanks, that works.

    Ivan
Back to Top