PivotGridControl.FormatConditions Property
Gets the collection of style format rules for a pivot grid control.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v24.1.dll
NuGet Package: DevExpress.Wpf.PivotGrid
Declaration
Property Value
Type | Description |
---|---|
FormatConditionCollection | A FormatConditionCollection object which is the collection of format conditions. |
Remarks
The PivotGridControl.FormatConditions
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 FormatConditionCollection objects containing style format conditions and permits managing this collection.
To apply conditional formatting, create a new instance of the required format type, specify its parameters and add it to the FormatConditionCollection collection using the FormatConditionCollection property.
To specify a data field (measure) to which value conditional formatting is applied, use the FormatConditionBase.MeasureName property. Use the field’s PivotGridField.Name property value to refer to the field.
You can apply the format to all data cells or a specified row and column intersection.
- To apply conditional formatting to a specified row and column intersection, set the condition’s FormatConditionBase.ApplyToSpecificLevel property to true and specify the column and row using the FormatConditionBase.ColumnName and FormatConditionBase.RowName properties, respectively.
- To apply conditional formatting to all data cells, make sure that the condition’s FormatConditionBase.ApplyToSpecificLevel is set to false. In this case, the FormatConditionBase.ColumnName and FormatConditionBase.RowName properties are ignored.
Note
Note that the PivotGridControl.CustomCellValue event does not affect format conditions defined using the FormatConditions property.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FormatConditions 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.