dataBinding

Fired before the widget binds to its data source.

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 data bind action. The PivotGrid will remain unchanged and dataBound event will not fire.

e.sender kendo.ui.PivotGrid

The widget instance which fired the event.

Example - subscribe to the "dataBinding" event during initialization

<div id="pivotgrid"></div>
<script>
$("#pivotgrid").kendoPivotGrid({
    height: 550,
    dataBinding: function(e) {
        e.preventDefault(); //this will prevent the data bind action
    },
    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 "dataBinding" event after initialization

<div id="pivotgrid"></div>
<script>
function dataBinding(e) {
    e.preventDefault();
}

$("#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("dataBinding", dataBinding);
</script>
In this article
Not finding the help you need?