Skip to main content
All docs
V24.2

FormatRuleCollection<T, TColumnType>.AddValueRule(TColumnType, AppearanceDefault, FormatCondition, Object, Object) Method

Applies a format to cells that contain specific values.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

public T AddValueRule(
    TColumnType column,
    AppearanceDefault appearanceDefault,
    FormatCondition condition,
    object value1,
    object value2 = null
)

Parameters

Name Type Description
column TColumnType

A {TColumnType} object that specifies a column (row in a vertical grid) to which the format should be applied.

appearanceDefault DevExpress.Utils.AppearanceDefault

The appearance settings that should be applied to the column (row in a vertical grid). This value is assigned to the Appearance property.

condition FormatCondition

The comparison operator (Equal, Between, Less, and so on). This value is assigned to the Condition property.

value1 Object

The first constant that is compared with column (row in vertical grid) values. This value is assigned to the Value1 property.

Optional Parameters

Name Type Default Description
value2 Object null

The second constant that is compared with column (row in vertical grid) values. This value is assigned to the Value2 property.

Returns

Type Description
T

A {T} object that specifies a format.

See Also