Completed
Last Updated: 11 May 2016 07:41 by ADMIN
Imported User
Created on: 17 Dec 2014 20:48
Category: Kendo UI for jQuery
Type: Feature Request
2
secondary sorting on a grouped grid
It makes sense that grouped grids should be sorted by the group name for proper paging, however, it would be nice to be able to sort by group name THEN BY another field. Wouldn't mess up paging.
2 comments
ADMIN
Petyo
Posted on: 11 May 2016 07:41
This is possible, Aaron, and you can test it on the following demo:
http://demos.telerik.com/kendo-ui/grid/index

Group by Country for instance, then sort the Contact Title or Company Name columns - the records in them will be sorted within the corresponding group, as expected.

Let me know if I am missing something.
Imported User
Posted on: 18 Dec 2014 18:19
Sorry I should have been much more specific--I wanted it to be on load, not by user interaction.
I have this (below), and it sends the sorts to the server which returns a series of entities in the order I expect (which is ordered by group name, then by Id). However, it appears that kendo then uses the group functionality and rearranges them (into order by group name, removes the "then by").

dataSource = {
   serverPaging: true,
   serverFiltering: true,
   serverSorting: true,
   sort: [
      {
         field: "GroupName",
         dir: "asc",
      },
      {
         field: "Id",
         dir: "asc",
      }
   ],
   group: {
      field: "GroupName",
      aggregates: false
   }
...