This is a migrated thread and some comments may be shown as answers.

RadListBox - Disable drag but allow drop events

2 Answers 75 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 25 Feb 2014, 01:15 PM
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 Answers, 1 is accepted

Sort by
0
Ivan
Top achievements
Rank 1
answered on 26 Feb 2014, 04:35 AM
Never mind. I had a custom DragDropBehavior assigned to B that had the "AllowCapturedDrag" property set to "true".
0
Polya
Telerik team
answered on 26 Feb 2014, 03:23 PM

Hi Ivan,

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

Regards,
Author nickname
Telerik

Tags
DragAndDrop
Asked by
Ivan
Top achievements
Rank 1
Answers by
Ivan
Top achievements
Rank 1
Polya
Telerik team
Share this question
or