New to Kendo UI for jQuery? Download free 30-day trial

Remove the Total Column Summaries in the PivotGridV2

Environment

Product Progress® Kendo UI® PivotGrid for jQuery

Description

How can I hide the Total column summaries in the jQuery PivotGridV2?

Solution

To achieve the desired scenario, use the dataBound event handler to target and hide the required elements.

<div id="pivotgrid"></div>
    <script>
      $(document).ready(function () {
        var pivotgrid = $("#pivotgrid").kendoPivotGridV2({
          height: 550,
          dataSource: {
            type: "xmla",
            columns: [{ name: ['[Date].[Calendar]'], expand: true }],
            rows: [{ name: ['[Geography].[City]'], expand: true },
                   { name: ['[Product].[Category]'] }],
            measures: [{ name: ['[Measures].[Reseller Freight Cost]'] }],
            transport: {
              connection: {
                catalog: "Adventure Works DW 2008R2",
                cube: "Adventure Works"
              },
              read: 'https://demos.telerik.com/olap/msmdpump.dll'
            }
          },
          dataBound: function(e) {
            this.element.find(".k-pivotgrid-values .k-pivotgrid-tbody tr:last-child").hide();
            this.element.find(".k-pivotgrid-row-headers .k-pivotgrid-tbody tr:last-child").hide();
          }
        }).data("kendoPivotGridV2");
      });
    </script>

See Also

In this article