alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ConditionalFormatRule

    Represents a conditional formatting rule that can be applied to a cell range.

    Inheritance
    object
    ConditionalFormatRule
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class ConditionalFormatRule
    Remarks

    Use this type to describe a single conditional formatting rule, including its rule ConditionalFormatType, optional color preset (ConditionalFormatColor), criteria values, target Range, and the CellFormat to apply when the rule matches.

    Instances of this class are accepted by the conditional formatting APIs such as ConditionalFormatAsync(ConditionalFormatRule) and are returned by read operations that enumerate worksheet conditional formats.

    Constructors

    ConditionalFormatRule()

    Declaration
    public ConditionalFormatRule()

    Properties

    ConditionalFormatColor

    Gets or sets the color preset to use for highlight-cells and top/bottom rules.

    Declaration
    public ConditionalFormatColor? ConditionalFormatColor { get; set; }
    Property Value
    Type Description
    ConditionalFormatColor?

    A nullable ConditionalFormatColor indicating a predefined fill/text color combination. Only applicable to highlight/top-bottom rules.

    ConditionalFormatType

    Gets or sets the type of conditional formatting rule.

    Declaration
    public ConditionalFormatType ConditionalFormatType { get; set; }
    Property Value
    Type Description
    ConditionalFormatType

    A ConditionalFormatType value that determines how the rule evaluates cell values and which visual treatment is applied.

    Format

    Gets or sets the formatting to apply when the rule matches.

    Declaration
    public CellFormat Format { get; set; }
    Property Value
    Type Description
    CellFormat

    A CellFormat object describing visual changes (background color, text color, font, etc.) that are applied to matching cells.

    PrimaryValue

    Gets or sets the primary value or formula used by the rule.

    Declaration
    public string PrimaryValue { get; set; }
    Property Value
    Type Description
    string

    A string containing a literal value or a formula expression (for example, "100" or "=AVERAGE(A:A)"). For comparison rules this represents the threshold or left-hand value.

    Range

    Gets or sets the A1-style range address that this rule applies to.

    Declaration
    public string Range { get; set; }
    Property Value
    Type Description
    string

    A string in A1 notation (for example, "Sheet1!A1:D10" or "A1:D10"). If not provided by the caller, API methods typically use the current selection as the target range.

    SecondaryValue

    Gets or sets the secondary value used by range-comparison rules.

    Declaration
    public string SecondaryValue { get; set; }
    Property Value
    Type Description
    string

    A string representing the upper bound for rules such as Between. May be null when not required.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved