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 for WPF PivotGridControl

$
0
0

This example is made based on the How to provide custom summary values for Total, Grand Total and ordinary cells example and illustrates how a cell type can be checked in the CustomSummary event handler. 
When the PivotGridControl.CustomSummary event is used to provide custom values for only Total or Grand Total cells, you can use the ColumnField and 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, you can use one of the following solutions:
1. Get calculated summary values using the SummaryValue property.
2. Calculate the value by iterating through DrillDownDataSource.
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. In this example ASPxPivotGrid is used, but the approach should be similar. 


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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