Tim
Tim

Reputation: 8921

Kendo UI Grid: possible to allow grouping on specified columns and not on other columns

With the Kendo UI grid (as shipped by Telerik) is it possible to allow grouping on some columns yet not on others? The demo example shows groupable: true as a grid-level property. The documentation reads groupable Boolean | Object(default: false). Can the groupable property be set to false on a column object, to override the grid-level groupability at the column-level?

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

});

Upvotes: 4

Views: 6294

Answers (1)

Petur Subev
Petur Subev

Reputation: 20193

Yay you almost self answered your question. Yes you can, here is sample column definition.

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

Make sure you use Q3 2012, I am not sure if it is supported in previous versions.

Upvotes: 5

Related Questions