Back to Devexpress

Pivot Grid

aspnetcore-400790-devextreme-based-controls-controls-pivot-grid.md

latest8.1 KB
Original Source

Pivot Grid

  • Mar 24, 2026
  • 3 minutes to read

Pivot Grid is a UI control that allows you to display and analyze multi-dimensional data.

Run Demo: Pivot Grid Read Tutorial

Getting Started

The Pivot Grid UI Control is based on the DevExtreme Pivot Grid component.

To add this control to your project, follow instructions in the following help topics:

Basic Syntax

cshtml
@(Html.DevExtreme().PivotGrid()
    .DataSource(dataSource => dataSource
        .Store(store => store.Xmla()
            .Url("https://demos.devexpress.com/Services/OLAP/msmdpump.dll")
            .Catalog("Adventure Works DW Standard Edition")
            .Cube("Adventure Works")
        ) 
        .Fields(fields => {
            fields.Add()
                .DataField("[Product].[Category]")
                .Area(PivotGridArea.Row);
            fields.Add()
                .DataField("[Product].[Subcategory]")
                .Area(PivotGridArea.Row);
            fields.Add()
                .DataField("[Ship Date].[Calendar Year]")
                .Area(PivotGridArea.Column);
            fields.Add()
                .DataField("[Ship Date].[Month of Year]")
                .Area(PivotGridArea.Column);
            fields.Add()
                .DataField("[Measures].[Reseller Freight Cost]")
                .Area(PivotGridArea.Data);
        })
    )
)
cshtml
using Microsoft.AspNetCore.Mvc;

namespace ASP.NET_Core.Controllers {
    public class PivotGridController : Controller {
        public IActionResult GettingStarted() {
            return View();
        }
    }
}

Built-in Capabilities and Configuration Guides

API

Server-Side API

InitializationCall the PivotGrid() method to create a Pivot Grid control. This action initializes a PivotGridBuilder<T> instance. Use the instance methods to specify Pivot Grid options and event handlers.OptionsFor a complete option list, see Options. For details on how to specify control options, refer to the following help topic: Specify Options.EventsFor available events, see Events. For details on how to handle events, refer to the following help topic: Handle Events and Define Callbacks.

Client-Side API

OptionsIf you need to specify the Pivot Grid options dynamically on the client side, use client-side API. For a complete option list, see DevExtreme Pivot Grid options.MethodsFor a list of available methods, see DevExtreme Pivot Grid methods. For details on how to call methods, refer to the following help topic: Call Methods.

Demos

Run Demo: Pivot Grid

See Also

Pivot Grid - Online Demo