Disable automatic moving of items

2 posts, 0 answers
  1. Scott Waye
    Scott Waye avatar
    109 posts
    Member since:
    Nov 2009

    Posted 20 Dec 2011 Link to this post


    Im using the DropQueryEvent and DropInfoEvent in my tree view to enable drag/drop of nodes.  It works fine and the items move ok, but when items are dropped I execute some database operations and in the case where these operations fail, I do not want the item to be moved.  I am happy to do the moving of tree nodes myself when the database operation completes, but to do that I need to disable the built in mechanism.  Is it possible?


  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 23 Dec 2011 Link to this post

    Hi Scott,

    The RadTreeView control has a built-in drag/drop functionality that exposes a number of events that allow you to customize it. You can find more info here. In your case you can handle the PreviewDragEnded event to stop the drop operation and implement your database-related logic. And then manually move the tree node per your requirements.

    Please give this approach a  try and let me know if it works for you or if I'm missing something.

    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top