The best solution to display calculations based on the huge amount of data within the PivotgridControl or ASPxPivotGrid is to create the OLAP Cube and perform all calculations on the SQL server side.
It's possible to slightly improve the performance when the PivotgridControl or ASPxPivotGrid is bound to the DataSet. The main idea is to group data when retrieving them from the database. This way, calculations performed on the client side will be reduced, and the pivot grid will load and sort data faster. In this instance, it's necessary to update the data source each time the user moves fields between areas. Otherwise, the pivot grid will display incorrect values.
This example demonstrates how to implement this in a simple case.
See Also:
Analysis Services
Binding to an OLAP Server
How to improve the PivotGrid performance
Example Comments
Added By: Lipo at: 3/12/2013 12:29:56 PM
I'm trying to run the example code you provided but it seems that some changes should be applied in order for it to work. Can you please specify the changes or prerequisites required for this code to run successfully.