Drag and Drop RadShape to RadDiagram Container

2 posts, 0 answers
  1. Graham
    Graham avatar
    2 posts
    Member since:
    Sep 2008

    Posted 23 Apr 2014 Link to this post


    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?

  2. Zarko
    Zarko avatar
    755 posts

    Posted 28 Apr 2014 Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top