Pivot Grid for WPF - How to Specify Custom Summary Values for Total, Grand Total, and Ordinary Cells
This example demonstrates how to determine the value type when you calculate custom summary values.
Follow the steps below to create a custom summary.
-
Create an ExpressionDataBinding object.
-
Pass the following expression in its constructor as a parameter:
iif(IsTotal([fieldColumnGroup]),'Grand Total',IsTotal([fieldRowGroup]),'Grand Total',IsTotal([fieldColumn]),'Total',IsTotal([fieldRow]),'Total',Sum([Data]))
-
Assign the
ExpressionDataBinding
instance to the fieldData field's DataBinding property.
How to Create a Custom Summary to Display the Distinct Value Count