We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Reordering items in ejListBox is not reflected in model.dataSource

Hi,

I'm trying to use ejListBox to reorder a list of elements, as in your example here: http://js.syncfusion.com/demos/web/#!/bootstrap/listbox/reordering

When using the moveUp() and moveDown() methods of ejGridBox, elements are moving correctly, but the changes are not reflected in the model.dataSource of the ejListBox. 


Checkout the developer console when clicking the buttons: the order in the model.dataSource remains unchanged.

Is there a different way to get the newly ordered list?

Alex

1 Reply

AP Arun Palaniyandi Syncfusion Team June 9, 2017 12:02 PM UTC

Hi Alexandru,   

 

Thanks for contacting Syncfusion support.   

 

When elements are moved up and down, the <li> elements are rearranged visually in the DOM and not in model. But if you want to order the dataSource model value, based on every reorder then you can achieve this in sample side itself.   

 

Please find the modified demo for your reference below:   

http://jsplayground.syncfusion.com/sasgeohg   

   

If the shared details and sample doesn’t meet your requirement, please give us more information to provide an alternative solution.       


Regards,
Arun P.  

SIGN IN To post a reply.
Loader.
Up arrow icon