All docs
V21.2
21.2
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

FormatConditionFilterElement Class

A filter element that works with a column’s Conditional Formatting Filters.

Namespace: DevExpress.Xpf.Core.FilteringUI

Assembly: DevExpress.Xpf.Grid.v21.2.dll

Declaration

public class FormatConditionFilterElement :
    FilterElement

Remarks

Tip

Topic: Filter Elements

Run Demo: Conditional Formatting Filters

Use the TableView.FormatConditions / TreeListView.FormatConditions property to define conditional formatting rules:

<dxg:GridControl x:Name="grid">
    <dxg:GridControl.View>
        <dxg:TableView>
            <dxg:TableView.FormatConditions>
                <dxg:TopBottomRuleFormatCondition FieldName="UnitPrice" Rule="TopPercent" 
                    Threshold="10" PredefinedFormatName="LightRedFillWithDarkRedText" />
                <dxg:TopBottomRuleFormatCondition FieldName="UnitPrice" Rule="BelowAverage" 
                    Threshold="10" PredefinedFormatName="YellowFillWithDarkYellowText" />
                <dxg:FormatCondition FieldName="Discount" ValueRule="Greater" 
                    Value1="0" PredefinedFormatName="GreenFillWithDarkGreenText" ApplyToRow="True" />
            </dxg:TableView.FormatConditions>            
        </dxg:TableView>
    </dxg:GridControl.View>
</dxg:GridControl>

The FormatConditionFilterElement allows a user to apply a filter based on a colum’s conditional formatting rules:

<dxg:GridControl x:Name="grid" ... />
<!-- ... -->
<dxfui:FormatConditionFilterElement FieldName="UnitPrice" Context="{Binding FilteringContext, ElementName=grid}"/>
See Also