Skip to main content

TdxSpreadSheetCustomConditionalFormattingRule Class

The base class for all conditional formatting rule classes.

Declaration

TdxSpreadSheetCustomConditionalFormattingRule = class(
    TcxInterfacedPersistent,
    IcxStoredObject
)

Remarks

A conditional formatting rule changes formatting of all cells whose values meet certain criteria.

Main API Members

The list below outlines key members of the TdxSpreadSheetCustomConditionalFormattingRule class. These members allow you to configure a conditional formatting rule.

Common Conditional Formatting Rule Settings

Areas
Allows you to manage the conditional formatting rule’s target areas.
Clone
Copies the rule between different sets of target areas.
Index | StopIfTrue
Specify how the rule interacts with other conditional formatting rules applied to the same cells.

General-Purpose API Members

Assign
Copies compatible settings between conditional formatting rules.
BeginUpdate | EndUpdate
Allow you to avoid excessive redraw operations during batch rule setting changes.
GetDetails
Returns the conditional formatting rule’s name displayed in the Conditional Formatting Rules Manager dialog.
LoadFromStream | SaveToStream
Allow you to store conditional formatting rule settings in a stream.
Owner
Provides access to the parent conditional formatting controller.

Create a Conditional Formatting Rule

To create a conditional formatting rule, you can call one of the overloaded Add procedures of the corresponding conditional formatting controller and pass a reference to one of the terminal TdxSpreadSheetCustomConditionalFormattingRule class descendants as the ARuleClass parameter:

TcxDataControllerConditionalFormatting.Add
Creates a new conditional formatting rule for a Data Grid, Tree List, or Vertical Grid control.
TdxSpreadSheetConditionalFormatting.Add
Creates a new conditional formatting rule in a spreadsheet document.

Alternatively, you can call the constructor of one of the terminal TdxSpreadSheetCustomConditionalFormattingRule class descendants and pass the target conditional formatting controller as the AOwner parameter.

Delete a Conditional Formatting Rule

To delete an individual conditional formatting rule, you can use one of the following options:

Alternatively, you can call the TdxSpreadSheetCustomConditionalFormatting.Clear procedure to delete all rules in a conditional formatting controller.

Terminal TdxSpreadSheetCustomConditionalFormattingRule Class Descendants

Do not use the TdxSpreadSheetCustomConditionalFormattingRule class directly. Use the following descendants instead:

Style-Based Conditional Formatting Rules

TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage
An Above or Below Average conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleCellIs
A Cell Is conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleDuplicateValues
A Duplicate Values conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleExpression
An Expression conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleTopBottomValues
A Top/Bottom Values conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleUniqueValues
A Unique Values conditional formatting rule.

Threshold-Based Conditional Formatting Rules

TdxSpreadSheetConditionalFormattingRuleDataBar
A Data Bar conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleIconSet
An Icon Set conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleThreeColorScale
A Three Color Scale conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleTwoColorScale
A Two Color Scale conditional formatting rule.

Indirect TdxSpreadSheetCustomConditionalFormattingRule Class Reference

The TdxSpreadSheetCustomConditionalFormatting.Rules property references any supported rule type as a TdxSpreadSheetCustomConditionalFormattingRule object.

To access all public API members, you need to cast the returned object to the corresponding terminal conditional formatting rule class. You can call the rule’s ClassType function to identify the actual rule type.

Implements

Inheritance

TObject
TPersistent
TInterfacedPersistent
TcxInterfacedPersistent
TdxSpreadSheetCustomConditionalFormattingRule
See Also