Skip to main content
A newer version of this page is available. .

PivotGridControl.FormatRules Property

Gets the collection of style format rules for a PivotGridControl.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.1.dll

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true, 1000, XtraSerializationFlags.DefaultValue)]
[XtraSerializablePropertyId(6)]
[DXCategory("Data")]
public virtual PivotGridFormatRuleCollection FormatRules { get; }

Property Value

Type Description
PivotGridFormatRuleCollection

A PivotGridFormatRuleCollection object which is the collection of style format rules.

Remarks

The FormatRules property allows you to apply conditional formatting, which involves applying appearances to data cells that match the specified rules. This property provides access to the collection of PivotGridFormatRule objects containing style format rules.

The PivotGridFormatRule class exposes the following major members that allow you to apply conditional formatting to data cells.

The following table lists supported PivotGridFormatRule.Settings settings for each rule.

FormatRules FormatRuleFieldIntersectionSettings FormatRuleTotalTypeSettings
FormatConditionRuleValue Dahsboard_GreenTick Dahsboard_GreenTick
FormatConditionRuleExpression Dahsboard_GreenTick Dahsboard_GreenTick
FormatConditionRuleContains Dahsboard_GreenTick Dahsboard_GreenTick
FormatConditionRuleAboveBelowAverage Dahsboard_GreenTick
FormatConditionRule2ColorScale Dahsboard_GreenTick
FormatConditionRule3ColorScale Dahsboard_GreenTick
FormatConditionRuleTopBottom Dahsboard_GreenTick
FormatConditionRuleDataBar Dahsboard_GreenTick
FormatConditionRuleIconSet Dahsboard_GreenTick

Note

Note, that the FormatConditionRuleDateOccuring and FormatConditionRuleUniqueDuplicate rules are not in effect for the PivotGridControl.

To check whether the format rule is correct, use the PivotGridFormatRule.IsValid property. If this property returns true, the format rule specified with the PivotGridControl.FormatRules property is applied to pivot data cells.

Note

Note that the PivotGridControl.CustomCellValue event does not affect format conditions defined using the FormatRules property.

See Also