Reputation: 43
I am trying to group the data accordingly
Department A(Group)
Class 1(Sub Group)
Morning
Afternoon
Evening
Class 2(Sub Group)
Morning
Afternoon
Evening
Department B(Group)
Any possibilities in Kendo ui grid grouping...
Upvotes: 0
Views: 2742
Reputation: 30661
Yes this is possible with Kendo UI Grid. Here is some sample code:
$("#grid").kendoGrid({
dataSource: {
data: [ {
department: "A",
"class": 1,
type: "Evening"
},{
department: "A",
"class": 2,
type: "Morning"
}, {
department: "B",
"class": 1,
type: "Evening"
}, {
department: "B",
"class": 2,
type: "Morning"
}],
// group by "department" and "class"
group: [ { field: "department" }, { field: "class" } ]
},
columns: [ { field: "type" } ]
});
And a live demo: http://jsbin.com/ejalut/1/edit
Upvotes: 6