Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > ComboBox and ListBox (obsolete as of Q2 2010) > Drag and Drop In two listbox

Not answered Drag and Drop In two listbox

Feed from this thread
  • Posted on Apr 6, 2010 (permalink)

    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.

    Reply

  • Victor Victor admin's avatar

    Posted on Apr 7, 2010 (permalink)

    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,
    Victor
    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.

    Reply

  • P avatar

    Posted on Dec 19, 2012 (permalink)

    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.
    Thanks.

    Reply

  • Stefan Stefan admin's avatar

    Posted on Dec 21, 2012 (permalink)

    Hello,

    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.
     
    Regards,
    Stefan
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > ComboBox and ListBox (obsolete as of Q2 2010) > Drag and Drop In two listbox
Related resources for "Drag and Drop In two listbox"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]