Drag & drop within the same control

3 posts, 0 answers
  1. Espen
    Espen avatar
    16 posts
    Member since:
    Sep 2011

    Posted 01 Jun 2010 Link to this post

    I've made a specialized control which inherits from ItemsControl, and has a Canvas where the items added to the control is placed. This works all fine and dandy when I pull items from a ListBox...however if I try to move the item in the Canvas to place it another place within the same control, it stops working. The events firing is:
    OnDragQuery DragQuery
    OnDragInfo DragInProgress
    OnDropQuery DropDestinationQuery
    OnDropQuery DropDestinationQuery
    OnDragInfo DragCancel

    Somehow I just can't figure out why on earth the OnDropInfo DropPossible event won't fire. What exact parameters needs to be in place for this to become true? I've set e.QueryResult and e.Handled = true in the OnDropQuery DropDestinationQuery...but it doesn't seem to make any difference as long as I'm still in the same control.
  2. Viktor Tsvetkov
    Viktor Tsvetkov avatar
    382 posts

    Posted 04 Jun 2010 Link to this post

    Hello Espen,

    Unfortunately the information you've provided us with is insufficient for me to determine what is causing the issue. Could you please send us a sample project demonstrating the problem. This way we will be better able to assist you. Meanwhile, I've attached a sample project that shows how item reordering works in a simple ListBox with different panels. Have a look at it and let us know how it goes.

    Kind regards,
    Viktor Tsvetkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
  4. Espen
    Espen avatar
    16 posts
    Member since:
    Sep 2011

    Posted 09 Jun 2010 Link to this post

    I somehow made this work...not sure what was different with my current solution compared to the old, but thanks for a reply regardless :)
Back to Top