0

我正在尝试对数据进行相应的分组

Department A(Group)
    Class 1(Sub Group)
        Morning
        Afternoon
        Evening
    Class 2(Sub Group)
        Morning
        Afternoon
        Evening
Department B(Group)

Kendo ui网格分组中的任何可能性......

4

1 回答 1

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" } ]
});

还有一个现场演示:http: //jsbin.com/ejalut/1/edit

于 2013-03-20T09:28:19.563 回答