Skip to main content

TcxDataControllerConditionalFormatting.Add(TcxCustomDataField,TdxSpreadSheetCustomConditionalFormattingRuleClass,Untyped) Method

Creates a new conditional formatting rule and applies it to the specified field in the source data controller.

Declaration

procedure Add(const AField: TcxCustomDataField; ARuleClass: TdxSpreadSheetCustomConditionalFormattingRuleClass; out ARule); overload;

Parameters

Name Type Description
AField TcxCustomDataField

The target field in the source data controller.

ARuleClass TdxSpreadSheetCustomConditionalFormattingRuleClass

The reference to the required conditional formatting rule class (a TdxSpreadSheetCustomConditionalFormattingRule descendant).

ARule

The created conditional formatting rule.

Remarks

Call the Add procedure to apply a conditional formatting rule to any data item (a Tree List or Data Grid column, or a Vertical Grid row).

Alternatively, you can call the constructor of the required conditional formatting rule class and pass the conditional formatting controller as a parameter.

Delete a Conditional Formatting Rule

To delete a conditional formatting rule, you can call the Remove procedure or release the rule directly in code (call the Free procedure in Delphi or use the delete keyword in C++Builder).

See Also