Drag and Drop to multiple List Boxes

5 posts, 0 answers
  1. Dave
    Dave avatar
    11 posts
    Member since:
    Jul 2011

    Posted 21 Nov 2011 Link to this post

    I have an application where I have 4 different Rad List Boxes.  I need to be able to drag and drop items from any one list box to any other, and fire a code behind event.  I'm transferring items, not making a copy and it seems like I have to establish a 'source' to 'destination' relationship for that.

    Is it possible to do what I need?

    Dave
  2. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 21 Nov 2011 Link to this post

    Hi Dave,

    The behaviour your looking for is not officially supported in RadListBox. However, you can use the workaround explained here to achieve it.

    Regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dave
    Dave avatar
    11 posts
    Member since:
    Jul 2011

    Posted 21 Nov 2011 Link to this post

    Thank you, the jacvascript code works.  Now,  each of those list boxes are bound to a dataset.  How do I update that dataset when an item is dropped into that listbox?
  5. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 23 Nov 2011 Link to this post

    Hi Dave,

    When using this approach, you won't be able to update tha datasets automatically. You have to do it manually. You can use trackChanges() and commitChanges() to log the transfers. Then when the page posts back, use the ClientChanges property of the listbox to go through all the transfers and do the corresponding database actions. You can find an example of a such an approach here.

    Greetings,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  6. Dave
    Dave avatar
    11 posts
    Member since:
    Jul 2011

    Posted 30 Nov 2011 Link to this post

    Thanks for the response.  I am still struggling with this problem.  Using your first JavaScript code, I'm able to transfer items from one list box to the other, but I'm completely unable to do any server side code. 
    Here are the things I'd like to be able to do.

    1. Respond on the server when a user double clicks any particular list box
    2. Update SQL data sources when a user transfers an item from one list box to the other.

    Could you please give me some help on this?  I'm really struggling, and could really use your help!

    Thanks,

    Dave
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017