Drag and Drop in ListControl Will not fire

4 posts, 0 answers
  1. Ken
    Ken avatar
    2 posts
    Member since:
    Dec 2012

    Posted 26 Dec 2012 Link to this post

    Hi:

    I'm trying to use the ListControl. I have two on my form and I use the DragDropManager to join them. However, it seems that I am unable to get any of the events associated with drag and drop to fire. I've created them using the properties list and everything in code is correct. Yet if I put a break point in the dragdrop event, it never gets there. (allow dragdrop is set to true).

    Anyone know what gives ?

    Thanks,
    Ken
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 27 Dec 2012 Link to this post

    Hello Ken,

    Thank you for contacting Telerik support.

    You can refer to our Demo Application (DropDown & List -> List Control -> Drag&Drop example) for a demo on how to move items from one RadListControl to another. From this example you can use the RadItemDragDropManager class in order to provide Drag & Drop between two RadListControls. For example:
    RadItemDragDropManager dragDropManager = new RadItemDragDropManager(this.radListBox1, this.radListBox1.Items, this.radListBox2, this.radListBox2.Items);

    I hope that you find this information useful.

    All the best,
    Peter
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ken
    Ken avatar
    2 posts
    Member since:
    Dec 2012

    Posted 27 Dec 2012 Link to this post

    Thanks for the response, Peter.

    I am using code from the sample. Visually, it works fine. The items do move from list 1 to list 2. The problem I am having is capturing any of the drag drop events. I've added events for all of them, put a breakpoint in each, and it is never hit.

    Ken
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 28 Dec 2012 Link to this post

    Hi Ken,

    Thank you for writing back.

    RadItemDragDropManager class uses its own drag drop mechanism, different than the default OLE drag & drop mechanism. That is why default drag & drop events do not get fired. In this scenario you can use BeginDrag and EndDrag methods of RadItemDragDropManager.

    If this does not help, describe in detail the desired functionality and behavior that you want to achieve and we will be glad to help further.

    I am looking forward to your reply.

    Kind regards,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top