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

5 posts, 0 answers
  1. Don
    Don avatar
    15 posts
    Member since:
    May 2011

    Posted 07 May 2014 Link to this post

    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.
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 08 May 2014 Link to this post

    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!
     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Don
    Don avatar
    15 posts
    Member since:
    May 2011

    Posted 08 May 2014 in reply to Alexander Valchev Link to this post

    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.
  5. Don
    Don avatar
    15 posts
    Member since:
    May 2011

    Posted 08 May 2014 in reply to Alexander Valchev Link to this post

    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.
  6. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 10 May 2014 Link to this post

    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!
     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready