我正在尝试相应地对数据进行分组
Department A(Group)
Class 1(Sub Group)
Morning
Afternoon
Evening
Class 2(Sub Group)
Morning
Afternoon
Evening
Department B(Group)
Kendo ui网格分组中的任何可能性......
答案 0 :(得分:6)
是的,这可以通过Kendo UI Grid实现。以下是一些示例代码:
$("#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" } ]
});