Prevent DragDrop Placement

2 posts, 1 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 12 Nov 2012 Link to this post


    How do I prevent the user from dragging content such as text and images and relocating it to a different location in the document?


  2. Answer
    Petya avatar
    983 posts

    Posted 14 Nov 2012 Link to this post

    Hi Rob,

    The behavior you want to achieve can be done by canceling the MoveSelectionCommand in the event handler of CommandExecuting.
    void editor_CommandExecuting(object sender, CommandExecutingEventArgs e)
        if (e.Command is MoveSelectionCommand)
            e.Cancel = true;

    I hope this helps! Feel free to contact us if you need additional assistance.
    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top