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

Diagram inside ItemsControl, Drag&Drop does not work

2 Answers 23 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
fabrizio
Top achievements
Rank 1
fabrizio asked on 22 Sep 2014, 09:36 AM
HI, i've applied many updates of dll in last two years but never changed the
code of my application, the D&D was working fine in last deploy 2
years ago. Some update introduced the issue but i don't know which one.


I added a little demo with the issue. If u drag the button (new node)
from the ribbons inside the diagram the OnDiagramDrop event in the
diagram does not fire as expected. The handler is attached to the
diagram in the loaded event.


Can someone help me to understand what's is wrong?

https://onedrive.live.com/redir?resid=693FAA40086B78A%219872



Thanks.

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 23 Sep 2014, 08:37 AM
Hello Fabrizio,

The default implementation of the Drop event handler of the diagram handles the event (sets the e.Handled property of the arguments to True). This is why the OnDiagramDrop() event handler is never executed. In order to resolve this you can set the last argument (handledEventsToo parameter) of the DragDropManager.AddDropHandler() method to True.

DragDropManager.AddDropHandler(sender as RadDiagram, OnDiagramDrop, true);
This will ensure that the event will be executed even if is handled.

Please try this and let me know if it helps.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
fabrizio
Top achievements
Rank 1
answered on 23 Sep 2014, 09:48 AM
ok it works
Tags
Diagram
Asked by
fabrizio
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
fabrizio
Top achievements
Rank 1
Share this question
or