FormatConditionCollection Class
Represents a collection of conditional formats.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v18.2.Core.dll
Declaration
Related API Members
The following members return FormatConditionCollection objects:
Remarks
The TableView.FormatConditions (or TreeListView.FormatConditions) collection stores conditional formatting rules applied to the grid’s view.
Use the following methods to add and remove conditional formatting rules.
- TableView.AddFormatCondition (or TreeListView.AddFormatCondition) - Adds a conditional formatting rule to the conditional format collection.
- TableView.ClearFormatConditionsFromAllColumns (or TreeListView.ClearFormatConditionsFromAllColumns) - Removes all conditional formatting rules applied to the grid’s view.
- TableView.ClearFormatConditionsFromColumn (or TreeListView.ClearFormatConditionsFromColumn) - Removes conditional formatting rules for the specified column from the conditional format collection.
The following code sample illustrates how to define a conditional formatting rule in markup. See the How to: Apply Conditional Formatting example to learn more.
<dxg:TableView.FormatConditions>
<dxg:DataBarFormatCondition FieldName="Visits" PredefinedFormatName="GreenGradientDataBar" />
</dxg:TableView.FormatConditions>
The code sample below illustrates how to define the same conditional formatting rule in code-behind. See the How to: Apply Conditional Formatting in Code-Behind example to learn more.
var visitsDataBar = new DataBarFormatCondition() {
FieldName = "Visits",
PredefinedFormatName = "GreenGradientDataBar"
};
view.AddFormatCondition(visitsDataBar);
Inheritance
Object
Collection<FormatConditionBase>
ObservableCollection<FormatConditionBase>
DevExpress.Xpf.Core.ObservableCollectionCore<FormatConditionBase>
FormatConditionCollection
See Also