Back to Devexpress

PivotGridControl.FormatRules Property

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-ce616dd8.md

latest6.9 KB
Original Source

PivotGridControl.FormatRules Property

Gets the collection of style format rules for a PivotGridControl.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true, 1000, XtraSerializationFlags.DefaultValue)]
[XtraSerializablePropertyId(6)]
[DXCategory("Data")]
public virtual PivotGridFormatRuleCollection FormatRules { get; }
vb
<XtraSerializableProperty(XtraSerializationVisibility.Collection, True, False, True, 1000, XtraSerializationFlags.DefaultValue)>
<XtraSerializablePropertyId(6)>
<DXCategory("Data")>
Public Overridable ReadOnly Property FormatRules As PivotGridFormatRuleCollection

Property Value

TypeDescription
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.

FormatRulesFormatRuleFieldIntersectionSettingsFormatRuleTotalTypeSettings
FormatConditionRuleValue
FormatConditionRuleExpression
FormatConditionRuleContains
FormatConditionRuleAboveBelowAverage
FormatConditionRule2ColorScale
FormatConditionRule3ColorScale
FormatConditionRuleTopBottom
FormatConditionRuleDataBar
FormatConditionRuleIconSet

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

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace