Reordered ListBox showing original order

2 posts, 0 answers
  1. Neil
    Neil avatar
    32 posts
    Member since:
    Aug 2016

    Posted 07 Jun Link to this post

    I've started using the ListBox. I noticed today that when I reordered a list using the up/down buttons, that the order doesn't update to the dataSource. Which makes sense, but is there a way to loop through the contents of the ListBox, so can update back to the database the new order?

    var selectedFields = $("#selectedFields").data("kendoListBox");
    var dataSource = selectedFields.dataSource;

    As you can see from the screenshots, CADWorx Id is listed 1st on the screen, but in the dataSource, it still shows Lg. Description 1st.

     

    Thanks,

    Neil

  2. Milena
    Admin
    Milena avatar
    244 posts

    Posted 09 Jun Link to this post

    Hello,

    You can achieve your goal as handle dragend event of ListBox. There you can access dataitem and datasource(using e.sender) from event aruments and manipulate them according to your recuirements.

    Regards,
    Milena
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top