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

How to calculate PercentVariation and AbsoluteVariation in a custom direction (e.g. from right to left)

$
0
0

This example shows how to use the PivotGridControl.CustomCellDisplayText or PivotGridControl.CustomCellValue event to display a field values as if its PivotGridFieldBase.SummaryDisplayType property is set to PercentVariation, but the values are read in the reverse direction (from right to left).

To accomplish this task, you should create a new PivotGridField, bind it to the DataField, and hide the grand totals for this field via the PivotGridFieldOptions.ShowGrandTotal property. After that, you will need to manually calculate a display text for this field in the CustomCellDisplayText or CustomCellValue event, as shown in the example project.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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