Back to Devexpress

TdxSpreadSheetConditionalFormattingRuleCellIs Class

vcl-dxspreadsheetconditionalformattingrules-64872cfd.md

latest9.7 KB
Original Source

TdxSpreadSheetConditionalFormattingRuleCellIs Class

A Cell Is conditional formatting rule.

Declaration

delphi
TdxSpreadSheetConditionalFormattingRuleCellIs = class(
    TdxSpreadSheetConditionalFormattingRuleExpression
)

Remarks

A Cell Is conditional formatting rule applies custom appearance settings to all cells whose values meet selected evaluation criteria. Depending on the criteria, the rule can use formula expressions, numeric values, etc.

Main API Members

The list below outlines key members of the TdxSpreadSheetConditionalFormattingRuleCellIs class. These members allow you to configure Cell Is rule settings.

Common Rule API Members

AreasAllows you to manage the conditional formatting rule’s target areas.CloneCopies the rule between different sets of target areas.Index | StopIfTrueSpecify how the rule interacts with other conditional formatting rules applied to the same cells.

Cell Is Rule-Specific API Members

ComparisonOperator

Allows you to switch between cell evaluation modes.

The Cell Is conditional formatting rule can compare the values of affected cells to a threshold value or check if the cell values are within a specific range.

Expression | Expression2

Specify spreadsheet-compatible formula expressions as cell formatting criteria.

The ComparisonOperator property value defines the active cell evaluation mode.

FormulasProvides access to parsed formula expressions.StyleAllows you to define the appearance of formatted cells.

General-Purpose API Members

AssignCopies compatible settings between conditional formatting rules.BeginUpdate | EndUpdateAllow you to avoid excessive redraw operations during batch rule setting changes.GetDetailsReturns the conditional formatting rule’s name displayed in the Conditional Formatting Rules Manager dialog.LoadFromStream | SaveToStreamAllow you to store conditional formatting rule settings in a stream.OwnerProvides access to the parent conditional formatting controller.

Create a Cell Is Rule

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

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

Alternatively, you can call the constructor of the TdxSpreadSheetConditionalFormattingRuleCellIs class and pass the target conditional formatting controller as the AOwner parameter.

Delete a Conditional Formatting Rule

To delete an individual Cell Is conditional formatting rule, you can do one of the following:

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

Other Style-Based Conditional Formatting Rule Classes

You can also use the following style-based rules to apply spreadsheet-compatible style settings to cells that meet specific conditions:

TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverageAn Above or Below Average conditional formatting rule.TdxSpreadSheetConditionalFormattingRuleDuplicateValuesA Duplicate Values conditional formatting rule.TdxSpreadSheetConditionalFormattingRuleExpressionAn Expression conditional formatting rule.TdxSpreadSheetConditionalFormattingRuleTopBottomValuesA Top/Bottom Values conditional formatting rule.TdxSpreadSheetConditionalFormattingRuleUniqueValuesA Unique Values conditional formatting rule.

Indirect TdxSpreadSheetConditionalFormattingRuleCellIs Class References

The TdxSpreadSheetCustomConditionalFormatting.Rules property references the TdxSpreadSheetConditionalFormattingRuleCellIs class as a TdxSpreadSheetCustomConditionalFormattingRule object.

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

Inheritance

TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TdxSpreadSheetCustomConditionalFormattingRule TdxSpreadSheetConditionalFormattingCustomRule TdxSpreadSheetConditionalFormattingRuleStyleBased TdxSpreadSheetConditionalFormattingRuleExpression TdxSpreadSheetConditionalFormattingRuleCellIs

See Also

TdxSpreadSheetConditionalFormattingRuleCustomScale Class

TdxSpreadSheetConditionalFormattingRuleCellIs Members

dxSpreadSheetConditionalFormattingRules Unit