windowsforms-devexpress-dot-xtraeditors-dot-formatconditionrulevalue-5cd6fe13.md
Gets or sets the comparison operator (Equal, Between, Less, etc.).
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(FormatCondition.None)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public FormatCondition Condition { get; set; }
<DefaultValue(FormatCondition.None)>
<XtraSerializableProperty>
<DXCategory("Behavior")>
Public Property Condition As FormatCondition
| Type | Default | Description |
|---|---|---|
| FormatCondition | None |
The comparison operator.
|
Available values:
| Name | Description |
|---|---|
| None |
The format is applied to all cells in the target column.
| | Equal |
The format is applied to cells (or corresponding rows) whose values match the FormatConditionRuleValue.Value1 property value.
| | NotEqual |
The format is applied to cells (or corresponding rows) whose values do not match the FormatConditionRuleValue.Value1 property value.
| | Between |
The format is applied to cells (or rows) whose values are between the Value1 and Value2 property values inclusive. Disable the BetweenConditionsIncludeEndpoints option to make the Between condition exclusive.
| | NotBetween |
The format is applied to cells (or rows) whose values are not between the Value1 and Value2 property values inclusive. Disable the BetweenConditionsIncludeEndpoints option to make the NotBetween condition exclusive.
| | Less |
The format is applied to cells (or corresponding rows) whose values are less than the FormatConditionRuleValue.Value1 property value.
| | Greater |
The format is applied to cells (or corresponding rows) whose values are greater than the FormatConditionRuleValue.Value1 property value.
| | GreaterOrEqual |
The format is applied to cells (or corresponding rows) whose values are greater or equal to the FormatConditionRuleValue.Value1 property value.
| | LessOrEqual |
The format is applied to cells (or corresponding rows) whose values are less or equal to the FormatConditionRuleValue.Value1 property value.
| | Expression |
The format is applied to cells (or corresponding rows) if the FormatConditionRuleValue.Expression evaluates to true.
|
Use the Condition , FormatConditionRuleValue.Value1 and FormatConditionRuleValue.Value2 properties to create a condition.
If the Condition property is set to None , the format is applied to all cells of the target column.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Condition 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.
winforms-grid-bind-to-business-objects/CS/GridBoundToRuntimeCreatedData/Form1.cs#L41
formatConditionRuleValue.PredefinedName = "Red Bold Text";
formatConditionRuleValue.Condition = FormatCondition.Greater;
formatConditionRuleValue.Value1 = DateTime.Today;
winforms-grid-bind-to-business-objects/VB/GridBoundToRuntimeCreatedData/Form1.vb#L43
formatConditionRuleValue.PredefinedName = "Red Bold Text"
formatConditionRuleValue.Condition = FormatCondition.Greater
formatConditionRuleValue.Value1 = Date.Today
See Also
FormatConditionRuleValue Class