PivotGrid Overview

The Kendo UI PivotGrid represents multidimensional data in a cross-tabular format.

Basic Configuration

To configure the PivotGrid to the Adventure Works cube that is hosted on http://demos.telerik.com, create the widget by defining an HTML <div> element.

    <!-- Define  the HTML div that will hold the PivotGrid -->
    <div id="pivotgrid">
    </div>

The following example demonstrates how to further configure the PivotGrid widget.

    <script>
        $(document).ready(function () {
            $("#pivotgrid").kendoPivotGrid({
                height: 200, // Define the height of the widget.
                dataSource: {
                    type: "xmla", // Define the type.
                    columns: [{ name: "[Date].[Calendar]" }], // Specify a dimension on columns.
                    rows: [{ name: "[Product].[Category]" }], // Specify a dimension on rows.
                    measures: ["[Measures].[Internet Sales Amount]"], // Specify a measure to display.
                    transport: {
                        connection: {
                            catalog: "Adventure Works DW 2008R2", // Specify the name of the catalog.
                            cube: "Adventure Works" // Specify the name of the cube.
                        },
                        read: {
                            url: "http://demos.telerik.com/olap/msmdpump.dll", // Define the URL of the service.
                            dataType: "text",
                            contentType: "text/xml",
                            type: "POST"
                        }
                    },
                    schema: {
                        type: "xmla" // Specify the type of the schema.
                    },
                }
            });
        });
    </script>

The previous example outputs the following result.

A sample Kendo UI PivotGrid

Functionality and Features

Referencing Existing Instances

To reference an existing PivotGrid instance, use the jQuery.data() method. Once a reference has been established, use the PivotGrid API to control its behavior.

The following example demonstrates how to access an existing PivotGrid instance.

var pivotgrid = $("#pivotgrid").data("kendoPivotGrid");

See Also

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