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

Access MDX Query

Sometimes you might need to override the DataSource generated query in a Kendo UI PivotGrid.

To achieve this behavior, access the generated MDX Query, as demonstrated in the following example.

<div id="example">
    <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]));

See Also

In this article
Not finding the help you need? Improve this article