This example demonstrates how to determine the value type when you calculate custom summary values.1. Set the data field's SummaryType property to Custom to perform calculations manually, by handling the CustomSummary event.
2. 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:
a. If ColumnField or RowField is null, it means that this is a Grand Total cell;
b. If both ColumnField and RowField are last fields in a corresponding area, this means that this is an ordinary cell.
c. In other cases, this is a Total cell.
Example versions for other platforms:
T555679: How to provide custom summary values for Total, Grand Total and ordinary cells for WinForms PivotGridControl
T555636: How to provide custom summary values for Total, Grand Total and ordinary cells for WPF PivotGridControl