AdapTable allows you to specify - and save - pivoting information in your Layout. This will subsequently be available each time you select that Layout.
In this demo we have created a Pivot View Layout that has the following properties set:
- Group on 'Employee' - through the RowGroupedColumns property.
- Select 'ShipVia' and 'ShipCountry' as the PivotColumns - which appear across the top.
- Set Aggregations (both of 'sum) on the 'InvoicedCost' and 'ItemCount' columns - via the AggregationColumns property.
- Set the EnablePivot property to true - which will turn on pivoting.
Note also that we created a Custom Sort for the Ship Via column so that 'Sppedy Express' is the firt value and that the pivot obeys this.
Finally, we set a Format Column for the 'InvoicedCost' column of 3 decimal places so that the aggregations will roll up nicely.