This topic demonstrates how to display a default List View as a pivot table in XAF applications:
The article uses a sample Order business object with the Customer, Product Name, Product Category, Price, and Units Purchased fields.
You can display the Order List View as a pivot table by adding the Pivot Grid Module to your application and replacing the default Grid List Editor with the Pivot Grid List Editor. The screenshot below demonstrates the result.
You can see examples with Pivot Grid List Editors in the FeatureCenter demo shipped with XAF. The Feature Center demo is installed in %PUBLIC%\Documents\DevExpress Demos 19.1\Components\eXpressApp Framework\FeatureCenter by default. The ASP.NET version of this demo is available online at http://demos.devexpress.com/XAF/FeatureCenter/.
Drag the PivotGridWindowsFormsModule item from the Toolbox onto the Required Modules panel.
Drag the PivotGridAspNetModule item from the Toolbox onto the Required Modules panel.
Navigate to the Views | Order_ListView node. In the EditorType (IModelListView.EditorType) property's drop-down, select "DevExpress.ExpressApp.PivotGrid.Win.PivotGridListEditor" instead of XAF's default List Editor.
Navigate to the Views | Order_ListView node. In the EditorType property's drop-down, select "DevExpress.ExpressApp.PivotGrid.Web.ASPxPivotGridListEditor" instead of XAF's default List Editor.
Navigate to the Views | Order_ListView_PivotGrid | PivotSettings node.
In the PivotGrid Designer, navigate to Main | Layout. Place the Product Name field in the Row Header Area, the Customer field in the Column Header Area area, and the Units Purchased field into the Data Header Area – as shown in the screenshot. Drag the Product Category and Price fields onto the Filter Header Area area to exclude them from the pivot table. This yields a pivot grid table summarizing sales arranged by customer.
Run the WinForms application and select the Order Navigation Item to display the pivot table.
Run the ASP.NET application and check that the Order pivot table is also available.