PDA

View Full Version : Sencha Touch list store diable sorting.



amritmishra
5 Nov 2012, 10:00 PM
I have my list which is getting data from php service, the data received is in the order I need. But sencha automatically sort my list alphabetically. Below is my code :

http://stackoverflow.com/questions/13232305/sencha-touch-list-store-diable-sorting/13235801#13235801

I want my list to be grouped according to the group_label, but not sorted.

ingo.hefti
6 Nov 2012, 1:54 PM
I think I once managed to do this by adding a sortProperty to a grouper. It shouldn't be an existing field so it will not find anything to sort. Hope this still works...


grouper: {
sortProperty: 'thisIsAnInexstingField',
groupFn: function (record) {
return record.data.group_label;
}
}

amritmishra
6 Nov 2012, 7:34 PM
Hmm its seems to affect the list, but not completely. I am still getting the list sorted in some weird manner like: numbers first, then alphabetically.

amritmishra
6 Nov 2012, 7:37 PM
I got the solution :
adding
remoteSort : true,
to the store is fixing the issue.