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

Drag alwais return DragCancel

2 Answers 46 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Pedro
Top achievements
Rank 1
Pedro asked on 18 Sep 2009, 06:16 PM
Hi,
I have been using the d&d for a while, it was working pretty well, but after some changes in the code, in theory they are not related with d&d just with styles, the DropInfo event is never accessed, I checked and the DragInfo event is returning DragCancel and the end of the drop operation but I dont know why, I am setting e.QueryResult = true in the  Dropquery event and that change is being visually reflected, but for some reason, when I drop the control, the status is DragCancel (I am catching that in the OnDragInfo, so the DropInfo is never executed, I checked the Destination control and its the correct one, any Ideas why is this happening?

2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 23 Sep 2009, 08:11 AM
Hi Pedro,

This is quite unexpected.

Properties that may affect the DragDrop are IsHitTestVisible, which should be true for the DropTargets and their visual ancestors.

Also, capturing the mouse on MouseDown or during DragDrop may affect the DragDrop.

Is it possible that the AllowDrag / AllowDrop properties were set in a style and it is not applied anymore or it is being replaced with a different style now? This will happen if you are using a custom theme and an ItemContainerStyle to set the DragDrop properties.

Can you identify what kind of changes were made? More information about that will help us narrow down the cause for the unexpected change.

Kind regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Pedro
Top achievements
Rank 1
answered on 23 Sep 2009, 01:55 PM
Hi,
As all the styles are  bound properties, styles were being changed as part of the d&d operation, and some element had a "white" background instead of "transparent", as this style was being used only when the application was in debug mode it was some kind of hard to catch the issue.

Thanks, Pedro. 
Tags
DragAndDrop
Asked by
Pedro
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Pedro
Top achievements
Rank 1
Share this question
or