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

Is it possible to make html.listboxfor draggable using kendoDraggable?

4 Answers 143 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 07 May 2014, 08:07 PM
Hi there,

I have two html.listboxfor, and need to swap data between them. Is there any way to make them draggable so that the user can drag and drop items in these two lists. Any help is much appreciated. Thanks.

4 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 08 May 2014, 09:02 AM
Hello Don,

I am afraid that this scenario is not supported. The ListBox widget is actually a select element with options. Sorting the options is not possible because it will prevent the user from being able to select items with mouse click.

If your aim is to create two containers with options that can be reordered my suggestion is to use standard list <ul> elements with <li> items. For example please check this demo page.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Don
Top achievements
Rank 1
answered on 08 May 2014, 02:58 PM
Hi Alexander,

Thank you very much for your help.  I am new using Html.Kendo().Sortable(). Could you please let me know how do we post <ul> list data as model data to the controller? It would be great if you can provide a demo for this.Thank you.
0
Don
Top achievements
Rank 1
answered on 08 May 2014, 03:03 PM
Hi Alexander,

Thank you very much for your help. Could you please let me know how do we post <li> items as model data to the controller? It would be great if you can provide a demo for this. Thank you.
0
Petyo
Telerik team
answered on 10 May 2014, 07:18 AM
Hi Don,

Check this example - it serializes the selected list items and and saves them in a hidden input ready for a form submission. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Don
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Don
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or