Drag and Drop In two listbox

Thread is closed for posting
4 posts, 0 answers
  1. dahv
    dahv avatar
    4 posts
    Member since:
    Jun 2007

    Posted 06 Apr 2010 Link to this post

    Hi, i'm trying to do the Drag and Drop like the demo, but my first listbox it's conected with my dataset and when I do the drag and drop, gives me this error:

    Data bound items can not be removed. Remove items from the data source instead.

    If you can explain to me how to fix this. Thank You.
  2. Victor
    Victor avatar
    1358 posts

    Posted 07 Apr 2010 Link to this post

    Hi dahv,

    Thank you for the question.

    When you are dragging from one listbox to another you are attempting to remove an item, which however is bound to a data record and if you remove it you will leave RadListBox in an invalid state, that is, you will desynchronize it with the data source. There is no way to fix this behavior of RadListBox.

    What you need to do is create a new RadListBoxItem with the same information as the item that you are trying to drag and drop in the destination list box. You can either remove the data record for the original item from the data source, which will also remove it from the source list box, or you can simply hide it and pretend that it is deleted. You can hide it by setting its Visibility property to Hidden.

    Write again if you have other questions.
    Sincerely yours,
    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. P
    P avatar
    4 posts
    Member since:
    Mar 2012

    Posted 19 Dec 2012 Link to this post

    I'm trying to do this, but the dragable feature is not working.  I can't drag anything.  The EnableDragAndDrop property is set to true.  
    I have 2 databound listboxes.  Everything works when using the buttons.  Just need to add the drag and drop.
    Please help.
  4. Stefan
    Stefan avatar
    2911 posts

    Posted 21 Dec 2012 Link to this post


    Thank you for writing. 

    Please note that RadListBox is no longer part of our suite and also is no longer supported. Feel free to use its ancestor RadListControl. In order demo application you can find a sample of drag and drop between RadListControls. 

    If you have any other questions regarding the new control, feel free to open a new thread in the appropriate forums: http://www.telerik.com/community/forums/winforms/dropdownlist-and-listcontrol.aspx.

    I hope this helps.
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top