RadListBox - Disable drag but allow drop events

3 posts, 0 answers
  1. Ivan
    Ivan avatar
    5 posts
    Member since:
    Jun 2013

    Posted 25 Feb 2014 Link to this post

    Hello,

    If have a 2 RadListBoxes (let's call them A and B). The user is able to drag items from A to B. I am hooking B's DragOver and Drop events to facilitate the dropping behavior I need. The items in B are displayed with a data template with a number of text boxes. I want the user to be able to select the text in the text boxes using the mouse. Doing so however triggers B's drag behavior so the text can't be selected this way. Items in B should not be dragable at all. If I create a custom DragDropBehavior class that prevents dragging and assign it to B then the text in the text boxes can be selected the way I want, but then I loose the DragOver and Drop events which I can't do without.

    So, is there a way that I can assign a custom DragDropBehavior to B and still have the DragOver and Drop events fire, or alternatively is there a way to disable dragging in B such that the drag behavior is not triggered when the mouse is dragged inside the text box of the data template?

    Thanks.

    Gerhard.
  2. Ivan
    Ivan avatar
    5 posts
    Member since:
    Jun 2013

    Posted 25 Feb 2014 in reply to Ivan Link to this post

    Never mind. I had a custom DragDropBehavior assigned to B that had the "AllowCapturedDrag" property set to "true".
  3. UI for WPF is Visual Studio 2017 Ready
  4. Polya
    Admin
    Polya avatar
    199 posts

    Posted 26 Feb 2014 Link to this post

    Hi Ivan,

    I am glad that the issue is resolved.
    If there is anything else please write to us again.

    Regards,
    Author nickname
    Telerik

Back to Top