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

Drag and Drop RadShape to RadDiagram Container

1 Answer 137 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Graham
Top achievements
Rank 1
Graham asked on 23 Apr 2014, 08:47 AM
Hi,

I know that there has been discussion before on this topic but the solutions there do not bring me any further forward. This means that dragging from the RadToolbox to a Container on a RadDiagram does not post any DragOver events when the shape is above the Container however the RadDiagram still receives these events. However, the RadDiagram does not receive and Drop event nor does the Container. The RadToolbox does however receive the corresponding DropComplete event. Simply:

1. Drag and Drop works correctly between the RadToolbox and the RadDiagram
2. Drag and Drop does not work when the drop is over the Container.
3. We are using 2013 Q3 release (which we cannot change, hence no upgrade to 2014 Q1 is possible)

This behavior is simply strange.

What I need to achieve is the Drop event on the Container or the RadDiagram (then I can interrogate the Containers to see if the drop position is within its boundaries).

What are my options?

Regards,
Graham

1 Answer, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 28 Apr 2014, 09:12 AM
Hello Graham,
You could try to add ClassHandlers for RadDiagramContainerShape's DragOverEvent and DropEvent like this:
EventManager.RegisterClassHandler(typeof(RadDiagramContainerShape), RadDiagramShape.DragOverEvent, new System.Windows.DragEventHandler(OnDragOver));
EventManager.RegisterClassHandler(typeof(RadDiagramContainerShape), RadDiagramShape.DropEvent, new System.Windows.DragEventHandler(OnDrop));
I've attached a sample project and as far as I tested everything is working as expected.
I hope I was able to help you.

Regards,
Zarko
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.
 
Tags
Diagram
Asked by
Graham
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Share this question
or