Back to Devexpress

PivotGridOptionsData.AllowCrossGroupVariation Property

corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridoptionsdata-d4020661.md

latest5.0 KB
Original Source

PivotGridOptionsData.AllowCrossGroupVariation Property

Gets or sets whether summary variations and running totals are calculated independently within individual groups, or throughout the Pivot Grid.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.PivotGrid.v25.2.Core.dll

NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
public bool AllowCrossGroupVariation { get; set; }
vb
<DefaultValue(True)>
Public Property AllowCrossGroupVariation As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true to calculate summary variations and running totals throughout the Pivot Grid; false to calculate them independently within individual groups.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowCrossGroupVariation
PivotGridControl

.OptionsData .AllowCrossGroupVariation

|

Remarks

The summary variation feature can be enabled via the PivotGridFieldBase.SummaryDisplayType property. To enable running totals, use the PivotGridFieldBase.RunningTotal property.

In the image below, absolute summary variations are calculated for the “Profit (var)” data field. The AllowCrossGroupVariation property is set to false , so the summary variations for the cells within the group “Year=1995” are calculated independently from the previous group “Year=1994”. Note the column “Year=1995, Qtr=1, Profit (var)” is empty.

If the AllowCrossGroupVariation property is set to true , summary variations in the group “Year=1995” are calculated taking into account values of the previous group “Year=1994”.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowCrossGroupVariation property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

web-forms-pivot-grid-change-summary-display-mode/CS/SummaryDisplayMode/Default.aspx.cs#L144

csharp
protected void cbAllowCrossGroupVariation_CheckedChanged(object sender, EventArgs e) {
    pivotGrid.OptionsData.AllowCrossGroupVariation = cbAllowCrossGroupVariation.Checked;
}

web-forms-pivot-grid-change-summary-display-mode/VB/SummaryDisplayMode/Default.aspx.vb#L164

vb
Protected Sub cbAllowCrossGroupVariation_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
    pivotGrid.OptionsData.AllowCrossGroupVariation = cbAllowCrossGroupVariation.Checked
End Sub

See Also

SummaryDisplayType

RunningTotal

Summary Display Types

PivotGridOptionsData Class

PivotGridOptionsData Members

DevExpress.XtraPivotGrid Namespace