Home › Forums › PivotGrid › group sorting
Tagged: group sorting
This topic contains 3 replies, has 2 voices, and was last updated by tony 3 years ago.
I have a pivot grid with ‘groupingView’ option. The data is grouped correctly but the sort order is not setting as ‘groupOrder’.
Here is the example. Rows are grouped by ‘grpname’, but the group order should be: G01->G01G11->G01G12->G01G13->G01G14. Please help.
And is there a new way to control the column order and the row order?
The problem your describe has many aspects.
1. You do not need to put a full grouping options in pivot grid.
The reson fro this is that the sorting of the final pivot data is done before you set the grouping options.
2. You will need to remove isGroupField or set it to true and remove groupingView options.
3. The sorting problem is not in jqGrid, but in your data.
If you try to sort the strings G01_XX->G01G11_XX->G01G12_XX->G01G13_XX->G01G14_XX
you will notice that the sorting with upper cased fields is diffrent with lower cased string.
4. I have added following in the pivot
– ignoreCase options to ignore the case sensitive sorting
– in xDimension I added sortorder and sorttype of the sorted field.
Here is your demo with the new build
With other words – remove isGroupedField and droupingView options and set ignoreCase to true in pivot options.
Thanks for explanation :)))
The ‘ignoreCase’ options helps a lot.
I still keep the ‘groupingView’ option because with this option the content of the first column can cross to next column, also there’s a demand to control the groupCollapse by default. Like this.
Glad to hear that it is working for you.
You can use groupView options, but setting groupField array with a different order field than in xDimension will bring unexpected result.
With other words groupView options can be used, but without groupField array.
You must be logged in to reply to this topic.
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS