View Full Version : Grid Grouping Sorting

31 Jan 2012, 12:31 PM
Hello, so I have a grid with 4 groups. However, I do not want the groups to be sorted. So lets say my store is structured as follows and i am grouping by the first element:
var dataStore = [

The grid will show up with the groups 0,1,2,3 in that order. I do not want this to happen, i want it to group in the order 0,2,3,1, the way the array is structured. Is this possible?

31 Jan 2012, 12:43 PM
If a store is grouped it will automatically sort the store on the group

if (me.groupers.items.length) {
me.sort(me.groupers.items, 'prepend', false);

31 Jan 2012, 12:51 PM
where does this if statement go? store listener?

31 Jan 2012, 12:56 PM
No... that is the code controlling the sorting in the store.

31 Jan 2012, 1:06 PM
Are you saying there is no way to override this?

1 Feb 2012, 12:36 PM
I am also interested in this. I have a grid that groups records by a threadID field, but I want to sort the grid by date or topic or some other column in the grid.