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 default location of the application is %PUBLIC%\Documents\DevExpress Demos 24.1\Components\XAF\FeatureCenter.NETFramework.XPO.
Note
Until the Pivot Grid Module supports Blazor UI, it is possible to integrate the Blazor Pivot
#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 use the Solution Wizard to create a new XAF solution. Select modules in the Choose Additional Modules step.
- To add an extra module in code, add it to the Xaf
Application. or ModuleModules Base. list (adding a reference to the module assembly is insufficient).Required Module Types
In .NET applications, you can call the Add
Pivot method in your WinGrid (IModule Builder <IWin Application Builder>) Forms application builder.
#DevExpress Controls Used by the Pivot Grid Module
The Pivot Grid module uses the following DevExpress controls:
Class | Description |
---|---|
Pivot |
Allows creating a pivot table in a Win |
ASPx |
Allows creating a pivot table in an ASP. |
You can access these controls and change their behavior in code. For more details, study the How to: Access the Grid Component in a List View 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.v24.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.v24.1.dll and DevExpress.ExpressApp.PivotGrid.Win.v24.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.v24.1.dll and DevExpress.ExpressApp.PivotGrid.Web.v24.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 |
---|---|
IModel |
Extends the Application Model with the Pivot |
IModel |
Provides access to the pivot grid List Editor a List View displays. |
IPivot |
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 IPivot
- 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 |
---|---|
Pivot |
Represents the pivot grid List Editor XAF Win |
ASPx |
Represents the pivot grid List Editor XAF ASP. |
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 Editor