Diagram inside ItemsControl, Drag&Drop does not work

3 posts, 0 answers
  1. fabrizio
    fabrizio avatar
    6 posts
    Member since:
    Oct 2010

    Posted 22 Sep 2014 Link to this post

    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?


  2. Martin Ivanov
    Martin Ivanov avatar
    1452 posts

    Posted 23 Sep 2014 Link to this post

    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.

    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. fabrizio
    fabrizio avatar
    6 posts
    Member since:
    Oct 2010

    Posted 23 Sep 2014 in reply to Martin Ivanov Link to this post

    ok it works
Back to Top