2013-03-20 54 views
0

我想組數據相應分組報頭劍道UI網格組頭

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

劍道UI電網分組的任何可能性......

回答

6

是的,這是可能的劍道UI電網。下面是一些示例代碼:

$("#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

+0

嘿智能工作的好友.....非常感謝你:) – sivaji 2013-03-20 10:05:08

+0

歡迎。隨時接受我的答覆作爲您的問題的答案。 – 2013-03-20 10:42:43