PivotGrid
- 3 minutes to read
PivotGrid is a UI control that allows you to display and analyze multi-dimensional data.
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:
- Configure a Visual Studio Project or Configure a non Visual Studio Project
- Add Controls to a Project
- Razor Syntax
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
Data Binding
PivotGrid can display data from various sources: an in-memory array, HTML5 web storage, OData service, OLAP server, or a customized data source. To process data from the source, use PivotGridDataSource.Summary Calculation Modes
PivotGrid displays value summaries (totals) in its cells. Choose between predefined summaries, aggregate values, or a implement a custom summary. PivotGrid can also calculate running totals by rows or columns.Customizable Layout
PivotGrid allows you to customize its layout. You can enable or disable multiple PivotGrid elements. Review the Visual Elements article for more information.Grouping, Sorting, and Filtering
PivotGrid groups data for header items and fields. Sort or filter fields through the UI or programmatically.Export to Excel
Export PivotGrid data to Excel in XLSX or CSV format and customize the exported cells.Chart Integration
PivotGrid handles large numeric datasets that can be hard to interpret. For a detailed data visualization, use the Chart component that integrates into PivotGrid.Virtual Scrolling
If PivotGrid is bound to a large dataset, you can enable a virtual scrolling mode to optimize data load time and reduce resource consumption.Drill Down
PivotGrid supports drill-down operations that allow you to retrieve individual records for calculating a specific summary value.
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.