Drag and drop Radlistbox and bindingsource

3 posts, 1 answers
  1. IT Development
    IT Development avatar
    25 posts
    Member since:
    Mar 2009

    Posted 05 Jun 2009 Link to this post

    Hello,

    I have a RadListbox and a couple of textboxes bound to a bindingsource with as datasource a generic list with objects.   When the selection in the listbox is changed the text in the textboxes also reflect the current selected object. All works fine there

    The listbox supports dragging and dropping of items (RadItemDragDropManager).   But when the order of the items is changed these changes are not reflected in the bindingsource and textboxes.

    any suggestion how i can realize that ?

    kind regards,

    Tim van Rooijen
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 11 Jun 2009 Link to this post

    Hello Tim,

    Thank you for contacting us.

    I am attaching a modified version of the RadItemDragDropManager. In this version, the manager is not actually removing and inserting the RadListBoxItems, but it is reordering the items in the data structure (in the RefreshItemsAfterDragDrop method) - for the purposes of the example this data structure is a BindingList. Since the RadListBox is bound to the BindingList, when the order of the items in the BindingList is changed, this reflects on the RadListBoxItems as well. Feel free to modify the RadItemDragDropManager further according to your specific needs.

    I hope this helps. If you have additional questions, feel free to contact me.

    Sincerely yours,

    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. IT Development
    IT Development avatar
    25 posts
    Member since:
    Mar 2009

    Posted 11 Jun 2009 Link to this post

    Hello Nikolay,

     

    Thanks for your reply.

    Just tested id and it Works really nice.

    Really appreciate the effort

     

    Greetings Tim


Back to Top