New to Telerik Document ProcessingStart a free 30-day trial

Conditional formatting applied to one or more cell ranges, dynamically styling cells based on a formatting rule.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.ConditionalFormattings

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class ConditionalFormatting

Inheritance: objectConditionalFormatting

Constructors

Initializes a new conditional formatting instance with the specified rule.

C#
public ConditionalFormatting(ConditionalFormattingRule rule)
Parameters:ruleConditionalFormattingRule

Methods

Evaluates the conditional formatting rule for the specified cell and returns a numeric result indicating formatting status.

C#
public double Resolve(CellIndex index)
Parameters:indexCellIndex

The index on which the formatting is applied.

Returns:

double

Replaces the current rule with a new rule and invalidates the worksheet layout with undo support.

C#
public void UpdateRule(ConditionalFormattingRule rule)
Parameters:ruleConditionalFormattingRule

The new rule that is applied.

Properties

Read-only collection of cell ranges to which this conditional formatting is applied.

C#
public ReadOnlyCollection<CellRange> CellRanges { get; }

Rule that determines which cells receive conditional formatting and what styling is applied.

C#
public ConditionalFormattingRule Rule { get; }

Worksheet to which this conditional formatting is applied; throws InvalidOperationException if accessed before the formatting is applied to a cell selection.

C#
public Worksheet Worksheet { get; }