Grouping is just a specific kind of sorting, but it must be the first sort that is done. The Grid class GroupingView normally asks the local ListStore to do the grouping as an extra sort, but if there is a loader present and it is configured for remote sort, then grouping will also be remote. Take any example that does sorting, and use a GroupingView instead, and this should go together correctly.
Thanks Colin for the quick response, that helped me. And if I need to have the previous sort as well as the secondary sort, I will need to maintain that in some variable and add it to the List<SortInfo> s right?
You can manage your sorts however you would like, but for it to appear correct when grouping, make sure the grouping sort is first. GroupingView manages this internally automatically, so if a user clicks a column header to sort, it sets it as the second sort info, see doSort for the impl details.