vcl-dxspreadsheetconditionalformattingrules.md
An Above or Below Average conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage = class(
TdxSpreadSheetConditionalFormattingRuleStyleBased
)
An Above or Below Average conditional formatting rule applies custom appearance settings to all cells whose values are above or below average within target areas.
The list below outlines key members of the TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage class. These members allow you to configure Above or Below Average rule settings.
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.
ComparisonOperator | StandardDeviationLevelSpecify formatting criteria for target areas.StyleAllows you to define the appearance of formatted cells.
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.
To create an Above or Below Average conditional formatting rule, you can call one of the overloaded Add procedures of the corresponding conditional formatting controller and pass a reference to the TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage 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 TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage class and pass the target conditional formatting controller as the AOwner parameter.
To delete an individual Above or Below Average conditional formatting rule, you can use one of the following options:
delete keyword in C++Builder).Alternatively, you can call the TdxSpreadSheetCustomConditionalFormatting.Clear procedure to delete all rules in a conditional formatting controller.
You can also use the following style-based rules to apply spreadsheet-compatible style settings to cells that meet specific conditions:
TdxSpreadSheetConditionalFormattingRuleCellIsA Cell Is 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.
The TdxSpreadSheetCustomConditionalFormatting.Rules property references the TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage class as a TdxSpreadSheetCustomConditionalFormattingRule object.
To access all public API members, you need to cast the returned object to the TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage class. You can call the rule’s ClassType function to identify the actual rule type.
TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TdxSpreadSheetCustomConditionalFormattingRule TdxSpreadSheetConditionalFormattingCustomRule TdxSpreadSheetConditionalFormattingRuleStyleBased TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage
See Also
TdxSpreadSheetConditionalFormattingRuleCustomScale Class
TdxSpreadSheetConditionalFormattingRuleAboveOrBelowAverage Members