This is a migrated thread and some comments may be shown as answers.

Drag and Drop to multiple List Boxes

4 Answers 132 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 21 Nov 2011, 02:01 PM
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

4 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 21 Nov 2011, 05:20 PM
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
0
Dave
Top achievements
Rank 1
answered on 21 Nov 2011, 07:32 PM
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?
0
Bozhidar
Telerik team
answered on 23 Nov 2011, 05:02 PM
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
0
Dave
Top achievements
Rank 1
answered on 30 Nov 2011, 05:35 PM
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
Tags
ListBox
Asked by
Dave
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Dave
Top achievements
Rank 1
Share this question
or