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

Reset the Expand State of the PivotGrid


Product Progress® Kendo UI® PivotGrid for jQuery
Operating System Windows 10 64bit
Browser Google Chrome
Browser Version 61.0.3163.100


How can I reset the expand or collapse state of the Kendo UI PivotGrid?


The following example demonstrates how to reset the expand/collapse state and fetch the data again in a Kendo UI PivotGrid component.

    <div id="example">
        <li>Expand "CY 2005" member</li>
        <li>Click "reset" button</li>
          <br />
          <button id="reset">Reset</button>
          <br />
          <div id="pivotgrid"></div>

            $(document).ready(function () {
              var pivotgrid = $("#pivotgrid").kendoPivotGrid({
                filterable: true,
                columnWidth: 200,
                height: 580,
                dataSource: {
                  type: "xmla",
                  columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Product].[Category]" } ],
                  rows: [{ name: "[Geography].[City]" }],
                  measures: ["[Measures].[Internet Sales Amount]"],
                  transport: {
                    connection: {
                      catalog: "Adventure Works DW 2008R2",
                      cube: "Adventure Works"
                    read: "",
                    parameterMap: function(options, type) {
                      var query =, type);

                      //modify the query here if needed

                      return query;
                  schema: {
                    type: "xmla"
                  error: function (e) {
                    alert("error: " + kendo.stringify(e.errors[0]));

              $("#reset").click(function() {
                // Create a new dataSource instance using the same options.
                let clonedOptions = pivotgrid.dataSource.options,
                    newDs = new;

                // Set the dataSource.

See Also

In this article