Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to provide custom summary values for Total, Grand Total and ordinary cells

$
0
0

This example is made using the ASPxPivotGrid control. This approach can be used with XtraPivotGrid and DXPivotGrid controls. When the CustomSummary event is used to provide custom values for only Total or Grand Total cells, you can use the PivotGridCustomSummaryEventArgs.ColumnField and PivotGridCustomSummaryEventArgs.RowField properties to determine the kind of a processed cell. You can use the following rules to determine that a cell is being processed:

1. If ColumnField or RowField is null, it means that this is a Grand Total cell;
2. If both ColumnField and RowField are last fields in a corresponding area, this means that this is an ordinary cell.
3. In other cases, this is a Total cell.

NOTE
This example demonstrates how to determine the value type. To calculate summary values, use one of the following solutions:
1. Get calculated summary values using the SummaryValue property.
2. Calculate the value by iterating through the DrillDownDataSource. This approach is demonstrated in the E1877: How to Implement Custom Summary example.
3. Calculate the value by summary values calculated for low level cells. This is the most complex approach demonstrated in the T158425: How to calculate Total cell values based on the low level Cell summary values example. 

Question Comments

Added By: Eurofins Lancaster Labs at: 10/12/2012 10:16:06 AM    

How can we override the bottom right grand total (total of grand totals)?

Added By: Eurofins Lancaster Labs at: 10/12/2012 11:17:42 AM    

Nevermind, I just had to loop through the items in the drill down data source.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>