Skip to main content

PivotGrid

  • 3 minutes to read

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

Run Demo: PivotGrid Read Tutorial

Getting Started

The PivotGrid UI Control is based on the DevExtreme PivotGrid component.

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

Basic Syntax

@(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);
        })
    )
)

Built-in Capabilities and Configuration Guides

API

Server-Side API

Initialization
Call the PivotGrid() method to create a PivotGrid control. This action initializes a PivotGridBuilder<T> instance. Use the instance methods to specify PivotGrid options and event handlers.
Options
For a complete option list, see Options. For details on how to specify control options, refer to the following help topic: Specify Options.
Events
For 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

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

Demos

Run Demo: PivotGrid

See Also