jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid grouping and group order.
This topic contains 4 replies, has 2 voices, and was last updated by Peter Stoev 11 years, 7 months ago.
-
Author
-
Hello again !
I notice a change since versions before 3.0 related to grouping on grid.
Before, the sorting order affected the order in which the groups are shown.
First item in data -> became first group
Second item in data, if part of the same group, it went to it
Third item in data, if not part of the first group -> became the second group
and so on.Now, it appears that the grid completely groups all rows and then attempts to show groups in a certain order which is completely ignoring the order of the data rows.
(In most cases, it displays groups alphabetically sorted).—
My question is:Is there ANY way to control the order in which groups are shown ? Or create a custom sorting function ?
I don’t necessarily want groups to be shown alphabetically.
For example, if data in a column which the grid is grouped by contains:
Priority: Urgent
Priority: High
Priority: Medium
Priority: LowI want those groups to be shown in this order:
Now instead it shows the groups alphabetically:
High
Low
Medium
UrgentI hope I made myself clear
Thanks !Some more information:
– Groups are always sorted ascending, no matter what is chosen in the sorting row –For example, now I tried to group by a “date” field, which was sorted descending, with most recent date on top.
When grouping, it shows the group with the oldest date first…Please remove the automatic group sorting, or give an option, thanks !
Hi wavetrex,
By design, when paging is enabled, groups are Sorted. It is not possible to modify that default behavior through API settings.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Well it wasn’t like that a few weeks ago… groups followed the data ordering.
That date field example for example makes it very weird, and grouping numbers also has the same strange effect.Check this:
http://img18.imageshack.us/img18/436/dxzm.jpgShows the group on field “Flight Date”… with the down pointing arrow [V], the column is definitely sorted downwards
-BUT-
The dates appear ascending, because the groups are automatically sorted ascending.Definitely not an expected behavior…
I hope that this “by design” gets changed back to the way it was, for groups order to follow the data order.
Or even better, a way to choose group ordering from the APIThanks !
Hi wavetrex,
The Grouping works as it should in Paging mode and we do not plan any changes there or API extensions.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.