windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-ce616dd8.md
Gets the collection of style format rules for a PivotGridControl.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true, 1000, XtraSerializationFlags.DefaultValue)]
[XtraSerializablePropertyId(6)]
[DXCategory("Data")]
public virtual PivotGridFormatRuleCollection FormatRules { get; }
<XtraSerializableProperty(XtraSerializationVisibility.Collection, True, False, True, 1000, XtraSerializationFlags.DefaultValue)>
<XtraSerializablePropertyId(6)>
<DXCategory("Data")>
Public Overridable ReadOnly Property FormatRules As PivotGridFormatRuleCollection
| Type | Description |
|---|---|
| PivotGridFormatRuleCollection |
A PivotGridFormatRuleCollection object which is the collection of style format rules.
|
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.
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