View Full Version : groupField sort issue

22 Apr 2013, 9:28 AM
I have two questions:

1. I have a store that uses groupField so that everything under Area A will be grouped together and everything under Area B will be grouped together. However, occasionally, after the grid is populated with data, a field originally from Area B will show up under Area A instead (and this happens randomly, not every time). Any idea why?

2. I noticed that by specifying a groupField, the store automatically sorts my data. Is there a way to turn off sorting? (I want my data to display in the order I inserted them).

Thank you for your help! :)

23 Apr 2013, 9:55 PM
Not quite sure what to tell you on issue 1. I've not heard of that before. If you have a test case where you can show where that happens that would be interesting to see.

For issue 2 you might start off setting the store's sortOnLoad to false and see if that solves it (didn't test myself, yet).

24 Apr 2013, 7:23 AM
Thank you for your reply, slemmon! :)

I'll follow up on issue 1 later (there's too much code involved for me to easily show the issue).

Regarding issue 2, I had already tried setting sortOnLoad to false before and I just tried it again but as expected, it didn't fix the issue. A little more details about the issue, once I comment out "groupField", the data is NOT automatically sorted anymore, it shows up in the exact order I inserted it. But of course, this is not the solution I want since I do want the groupField. Also it's worth noting that the order that the data gets (automatically) sorted in doesn't seem to be ASC or DESC, it's just like a random order (although it's the same every time I load the table).

24 Apr 2013, 7:32 AM
Also wanted to add that I was able to turn off sorting before when I was using a REST proxy and I set remoteSort to be true, my guess is that since I'm delaying sorting to the server (which has no sorting algorithms), the data essentially shows up unsorted.

However, now my store uses a MEMORY proxy instead, and setting remoteSort to true no longer has an effect, probably because it knows that it doesn't make sense to delay sorting to a server in a local proxy so it sorts locally anyways?

24 Apr 2013, 10:16 AM
I did a little digging in the bug reports. It looks like this was a reported issue and is fixed in 4.2.1 Beta.

24 Apr 2013, 10:42 AM
Oh awesome!

Any chance issue 1 is also a reported issue?

Thank you. :)