Pivot Grid Module
- 5 minutes to read
The Pivot Grid module is a comprehensive data analysis, data mining, and visual reporting solution for XAF applications. The module contains List Editors that adapt DevExpress WinForms Pivot Grid and ASP.NET Web Forms Pivot Grid controls for XAF. The feature enables you to summarize large amounts of data in a multi-dimensional pivot table where you can sort, group, and filter the data.
The Pivot Chart Module can also visualize the data in 2D or 3D graphics charts.
End-users can customize the table’s layout according to their analysis requirements with simple drag-and-drop operations.
For the Pivot Grid module’s demonstration, access the List Editors | PivotGrid section in the Feature Center application supplied with XAF. The Feature Center demo is installed in %PUBLIC%\Documents\DevExpress Demos 21.1\Components.NET Core Desktop Libraries\eXpressApp Framework\FeatureCenter by default. The ASP.NET Web Forms version of this demo is available online at https://demos.devexpress.com/XAF/FeatureCenter/.
Note
Until the Pivot Grid Module supports Blazor UI, it is possible to integrate the Blazor PivotGrid control into your Blazor application manually. The following topic describes how to do this: Blazor - How to integrate the Pivot Grid into an XAF app.
Getting Started
You can add the Pivot Grid module to an existing project by following the How to: Display a List View as a Pivot Grid Table and Chart tutorial.
Note
You can add modules to your application when you create a new XAF solution using the Solution Wizard. To do this, select modules in the Choose Extra Modules step.
- To add an extra module in code, add it to the XafApplication.Modules or ModuleBase.RequiredModuleTypes list (adding a reference to the module assembly is insufficient).
DevExpress Controls Used by the Pivot Grid Module
The Pivot Grid module uses the following DevExpress controls:
Class | Description |
---|---|
PivotGridControl | Allows creating a pivot table in a WinForms application. |
ASPxPivotGrid | Allows creating a pivot table in an ASP.NET Web Forms application. |
You can access these controls and change their behavior in code. For more details, study the How to: Access the List Editor’s Control topic.
Pivot Grid Module Components
The Pivot Grid module consists of the following platform-agnostic and platform-specific components:
-
You can add this module to your XAF application’s platform-agnostic module project in the Module Designer.
The module adds references to the DevExpress.ExpressApp.PivotGrid.v21.1.dll assembly.
-
You can add this module to your WinForms module project in the Module Designer or the WinForms application project in the Application Designer.
The module references the DevExpress.ExpressApp.PivotGrid.v21.1.dll and DevExpress.ExpressApp.PivotGrid.Win.v21.1.dll assemblies.
-
You can add this module to your ASP.NET Web Forms module project in the Module Designer or application project in the Application Designer.
The module references the DevExpress.ExpressApp.PivotGrid.v21.1.dll and DevExpress.ExpressApp.PivotGrid.Web.v21.1.dll assemblies.
For the Pivot Grid Module’s best performance, add it to platform-specific projects only and customize the module there. Do not use the PivotGridModule component intended for the base module project.
Pivot Grid Module Settings
The entities below allow you to adjust the Pivot Grid module’s settings in the Application Model:
Interface | Description |
---|---|
IModelPivotListView | Extends the Application Model with the PivotSettings node. |
IModelPivotSettings | Provides access to the pivot grid List Editor a List View displays. |
IPivotSettings | Declares members of classes that specify settings of the pivot grid List Editor a List View displays. |
These settings are available in the Application Model‘s Views | <ListView> | PivotSettings node.
The IPivotSettings.CustomizationEnabled property is set to true by default and allows end-users to modify their pivot table’s settings.
Important
Set the IPivotSettings.CustomizationEnabled property value depending on your application’s prevailing usage scenario.
- Choose false if you want to present data to end users in a specific layout. The false setting gives you full control over the pivot table’s behavior and prevents users from changing it.
- Choose true if end users need to frequently modify the pivot table’s data layout. Note that once the user changes the pivot table’s settings, they are recorded to the Application Model‘s top-layer .xafml file and you cannot overwrite them. In some cases, an end user’s settings may merge with the modifications the developer specified in lower-level *.xafml files, and cause unpredictable behavior. The end user can get your default settings by right-clicking the pivot table and selecting **Reset View Settings* in the context menu.
The IPivotSettings.Settings property value is a complex XML-formatted string. To manage these settings, click the Settings’ ellipsis button ().
The button invokes the PivotGrid designer that allows you to modify the pivot table’s layout and its other preferences.
Pivot Grid Module List Editors
The Pivot Grid module ships with the following List Editors:
Class | Description |
---|---|
PivotGridListEditor | Represents the pivot grid List Editor XAF WinForms applications use. |
ASPxPivotGridListEditor | Represents the pivot grid List Editor XAF ASP.NET Web Forms applications use. |
You can set the IModelListView.EditorType property value to one of these editors in the Application Model as the screenshots below illustrate.
The EditorType property value is set to “DevExpress.ExpressApp.PivotGrid.Win.PivotGridListEditor” in the WinForms module project.
The EditorType property value is set to “DevExpress.ExpressApp.PivotGrid.Web.ASPxPivotGridListEditor” in the ASP.NET Web Forms module project.
Note
Alternatively, you can invoke the Model Editor from the application projects and change the EditorType property value there.