# ASP.NET Core PivotGrid Overview

The Telerik UI PivotGrid TagHelper and HtmlHelper for ASP.NET Core are server-side wrappers for the Kendo UI PivotGrid widget. To add the component to your ASP.NET Core application, you can use either.

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

* [Demo page for the PivotGrid HtmlHelper](https://demos.telerik.com/aspnet-core/pivotgrid)

* [Demo page for the PivotGrid TagHelper](https://demos.telerik.com/aspnet-core/pivotgrid/tag-helper)

> The new PivotGridV2 is now available. It offers a brand new design and a new future-proof architecture that allows the implementation of many upcoming functionalities. As PivotGridV2 aims to replace the legacy PivotGrid, it is recommended to use the PivotGridV2 in your new projects. For information about the differences between the PivotGrid and PivotGridV2, refer to the [Comparison](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgridv2/comparison) article.

## Basic Configuration

To configure the PivotGrid for Ajax binding to an [Adventure Works](https://learn.microsoft.com/en-us/analysis-services/multidimensional-tutorial/multidimensional-modeling-adventure-works-tutorial?view=asallproducts-allversions) cube that is hosted on `https://demos.telerik.com/service/v2/olap/msmdpump.dll`, follow the next steps:

1. Create a new ASP.NET Core application. If you have the [Telerik UI for ASP.NET Core Visual Studio Extensions](https://www.telerik.com/aspnet-core-ui/documentation/vs-integration/introduction) installed, create a Telerik UI for ASP.NET Core application. Name the application `KendoPivotGrid`. If you decide not to use the Visual Studio Extensions, follow the steps from the [introductory article](https://www.telerik.com/aspnet-core-ui/documentation/getting-started-core/first-steps) to install Telerik UI for ASP.NET Core in the application.

2. Add a PivotGrid to the `Index` View.

   ```Razor HtmlHelper
       @(Html.Kendo().PivotConfigurator()
           .Name("configurator")
           .Filterable(true)
           .Sortable()
           .Height(570)
       )

       @(Html.Kendo().PivotGrid()
           .Name("pivotgrid")
           .ColumnWidth(200)
           .Height(570)
           .Filterable(true)
           .Sortable()
           .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/service/v2/olap/msmdpump.dll")
                       .DataType("text")
                       .ContentType("text/xml")
                       .Type(HttpVerbs.Post)
                   )
               )
           )
       )
   ```

   ```Razor TagHelper
       @addTagHelper *, Kendo.Mvc

       <kendo-pivotdatasource type=@(PivotDataSourceType.Xmla) name="pivotSource">
           <columns>
               <pivot-datasource-column name="[Date].[Calendar]" expand="true"></pivot-datasource-column>
               <pivot-datasource-column name="[Product].[Category]"></pivot-datasource-column>
           </columns>
           <rows>
               <row name="[Geography].[City]"></row>
           </rows>
           <schema type="xmla"/>
           <measures values=@(new string[] {"[Measures].[Reseller Freight Cost]"} ) ></measures>
           <transport>
               <read url="https://demos.telerik.com/service/v2/olap/msmdpump.dll" datatype="text" content-type="text/xml" type="POST" />
               <connection catalog="Adventure Works DW 2008R2" cube="Adventure Works"></connection>
           </transport>
       </kendo-pivotdatasource>

       <kendo-pivotconfigurator name="configurator"
           filterable="true"
           height="570"
           datasource-id="pivotSource">
       </kendo-pivotconfigurator>

       <kendo-pivotgrid name="pivotgrid"
           filterable="true"
           column-width="200"
           height="570"
           datasource-id="pivotSource">
           <sortable enabled="true" />
       </kendo-pivotgrid>
   ```

3. Build and run the application.

## Functionality and Features

* [Data binding](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/data-binding/overview)—You can bind the PivotGrid to [Online Analytical Processing (OLAP)](https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2005/ms175367\(v=sql.90\)) cube and or flat data.
* [Filtering](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/filtering)—Enable the filtering of the PivotGrid rows and columns.
* [Sorting](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/sorting)—The component supports sorting by the caption name of the members.
* [Templates](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/templates)—The available templates allow you to control the rendering of the data cells and headers.
* [Excel export](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/export/excel-export)—The PivotGrid provides an export to Excel feature.
* [PDF export](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/export/pdf-export)—You can export the PivotGrid content to PDF through a single click.

## Next Steps

* [Getting Started with the PivotGrid](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/getting-started)

* [Basic Usage of the PivotGrid HtmlHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/pivotgrid)

* [Basic Usage of the PivotGrid TagHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/pivotgrid/tag-helper)

## See Also

* [Server-Side API of the PivotGrid HtmlHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/pivotgrid)

* [Server-Side API of the PivotGrid TagHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/taghelpers/pivotgrid)

* [Client-Side API of the PivotGrid](https://docs.telerik.com/kendo-ui/api/ui/pivotgrid)

* [Razor Pages binding](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/data-management/pivotgrid/data-binding/razor-page)
