Edit this page

Reset Expand State

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

<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: "https://demos.telerik.com/olap/msmdpump.dll",
                      parameterMap: function(options, type) {
                        var query = kendo.data.transports.xmla.fn.options.parameterMap(options, 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() {

See Also

For more runnable examples on the Kendo UI PivotGrid, browse its How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article