collapseMember

Fired before column or row field is collapsed.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.preventDefault Function

If invoked prevents the collapse and the widget will remain in its current state.

e.sender kendo.ui.PivotGrid

The widget instance which fired the event.

e.axis String

The axis that will be collapsed. Possible values columns or rows.

e.path String

The path to the field that will be collapsed.

Example - subscribe to the "collapseMember" event during initialization

<div id="pivotgrid"></div>
<script>
$("#pivotgrid").kendoPivotGrid({
    height: 550,
    collapseMember: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("collapse member");
    },
    dataSource: {
        type: "xmla",
        columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
        rows: [{ name: "[Product].[Product]" }],
        measures: ["[Measures].[Internet Sales Amount]"],
        transport: {
            connection: {
                catalog: "Adventure Works DW 2008R2",
                cube: "Adventure Works"
            },
            read: {
                url: "https://demos.telerik.com/olap/msmdpump.dll",
                dataType: "text",
                contentType: "text/xml",
                type: "POST"
            }
        },
        schema: {
            type: "xmla"
        }
    }
});
</script>

Example - subscribe to the "collapseMember" event after initialization

<div id="pivotgrid"></div>
<script>
function collapseMember(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("collapse member");
}

$("#pivotgrid").kendoPivotGrid({
    height: 550,
    dataSource: {
        type: "xmla",
        columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
        rows: [{ name: "[Product].[Product]" }],
        measures: ["[Measures].[Internet Sales Amount]"],
        transport: {
            connection: {
                catalog: "Adventure Works DW 2008R2",
                cube: "Adventure Works"
            },
            read: {
                url: "https://demos.telerik.com/olap/msmdpump.dll",
                dataType: "text",
                contentType: "text/xml",
                type: "POST"
            }
        },
        schema: {
            type: "xmla"
        }
    }
});
var pivotgrid = $("#pivotgrid").data("kendoPivotGrid");
pivotgrid.bind("collapseMember", collapseMember);
</script>
In this article