PivotGridV2 HtmlHelper Overview

The Telerik UI PivotGridV2 HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI PivotGridV2 widget.

The PivotGridV2 represents multidimensional data in a cross-tabular format.

Telerik UI for ASP.NET MVC Ninja image

The PivotGridV2 is part of Telerik UI for ASP.NET MVC, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Compared to the legacy PivotGrid, the new PivotGridV2 offers a brand new design, and its future-proof architecture allows the implementation of many upcoming features. We recommended using the PivotGridV2 in your new projects, because, at some point in the future, the PivotGridV2 will replace the legacy PivotGrid. For more details about the differences between the PivotGrid and PivotGridV2, refer to the Comparison article.

Basic Configuration

To configure the PivotGridV2 for Ajax binding to an Adventure Works cube that is hosted on https://demos.telerik.com/olap/msmdpump.dll:

  1. Create a new ASP.NET MVC application. If you have the Telerik UI for ASP.NET MVC Visual Studio Extensions installed, create a Telerik UI for ASP.NET MVC application. Name the application KendoPivotGridV2. If you decide not to use the Telerik UI for ASP.NET MVC Visual Studio Extensions, follow the steps from the getting started article to add Telerik UI for ASP.NET MVC to the application.
  2. Add a PivotGridV2 to the Index view.

         @(Html.Kendo().PivotConfiguratorV2()
            .Name("configurator")
            .Filterable(true)
            .Sortable()
            .Height(570)
        )
    
        @(Html.Kendo().PivotGridV2()
            .Name("pivotgridv2")
            .ColumnWidth(200)
            .Height(570)
            .Configurator("#configurator")
            .DataSource(dataSource => dataSource.
                Xmla()
                .Columns(columns => {
                    columns.Add("[Date].[Calendar]").Expand(true);
                    columns.Add("[Product].[Category]");
                })
                .Rows(rows => rows.Add("[Geography].[City]"))
                .Measures(measures => measures.Values(new string[]{"[Measures].[Reseller Freight Cost]"}))
                .Transport(transport => transport
                    .Connection(connection => connection
                        .Catalog("Adventure Works DW 2008R2")
                        .Cube("Adventure Works"))
                    .Read(read => read
                        .Url("https://demos.telerik.com/olap/msmdpump.dll")
                        .DataType("text")
                        .ContentType("text/xml")
                        .Type(HttpVerbs.Post)
                    )
                )
            )
        )
    
  3. Build and run the application.

The following image demonstrates the output from the previous example.

UI for ASP.NET MVC PivotGridV2

Functionality and Features

Referencing Existing Instances

To reference an existing PivotGrid instance, use the jQuery.data() method. Once a reference is established, use the PivotGridV2 client-side API to control its behavior.

var pivotgridv2 = $("#pivotgridv2").data("kendoPivotGridV2");

See Also

In this article