This is a migrated thread and some comments may be shown as answers.

[Solved] Sorting the groups on a different levels programmatically

1 Answer 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 18 Nov 2014, 03:19 PM
Hello,
 
This thread describes how to sort the groups (1 level
grouping) programmatically:
http://www.telerik.com/forums/sorting-the-group-programmatically
 
Example:
//get
reference to the Grid widget
var grid = $("#grid").data("kendoGrid");
//set asc
direction to the group (for example grouped by FirstName)
grid.dataSource.group({field:"FirstName", dir: "asc" });
//set desc
direction to the group (for example grouped by FirstName)
grid.dataSource.group({field:"FirstName", dir: "desc" });
 
We have tried to apply this approach to the grid with few
levels of grouping and had no luck.
Could you please
·        
let us know if that approach works for grid
with subgroups
·        
provide working example of code
Thank you.
 


1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 20 Nov 2014, 12:06 PM
Hello Tony,

The same approach should work with multiple groups. Please check this example and let me know if I am missing something.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Tony
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or