【问题标题】:Kendo UI Grid: possible to allow grouping on specified columns and not on other columnsKendo UI Grid:可以允许在指定列上而不是在其他列上进行分组
【发布时间】:2012-11-30 12:13:05
【问题描述】:

使用 Kendo UI 网格(由 Telerik 提供)是否可以允许在某些列上进行分组但在其他列上不允许?演示示例将groupable: true 显示为网格级属性。文档为groupable Boolean | Object(default: false)。可以在列对象上将 groupable 属性设置为 false,以覆盖列级别的网格级别可分组性吗?

$("#grid").kendoGrid({
 dataSource: {
     data: createRandomData(50),
     pageSize: 10
 },
 columns: [
     {
         field: "Name"
     },
     {
         groupable: false,    /*  ?prevent grouping on birthdate? */
         field: "BirthDate",
         title: "Birth Date",
         template: '#= kendo.toString(BirthDate,"dd MMMM yyyy") #'
    }
 ],
  groupable: true

});

【问题讨论】:

    标签: grid grouping kendo-ui


    【解决方案1】:

    是的,你几乎自己回答了你的问题。是的,您可以,这是示例列定义。

     {
            "title": "Birth Date",
            "field": "BirthDate",
            "groupable": false
     }
    

    请确保您使用的是 Q3 2012,我不确定以前的版本是否支持它。

    【讨论】:

    • 有趣的是,columns.sortable 和 columns.filterable 在 API 文档中,但 columns.groupable 不在。
    • 可能是最近添加的,文档没有更新。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-13
    • 2014-09-07
    相关资源
    最近更新 更多