Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ConditionalFormattingCollection.GetConditionalFormattings(CellRange) Method

Obtains conditional formatting rules applied to the specified cell range.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

IEnumerable<ConditionalFormatting> GetConditionalFormattings(
    CellRange range
)

#Parameters

Name Type Description
range CellRange

A cell range for which conditional formatting rules are obtained.

#Returns

Type Description
IEnumerable<ConditionalFormatting>

A collection of conditional formats applied to the cell range.

#Remarks

Use the GetConditionalFormattings method to obtain a collection of conditional formats applied to a specific cell range. This method returns an empty list in the following cases:

  • If the method’s range parameter is null.

  • If the specified range doesn’t contain any conditional formats applied.

If a cell range specified by the range parameter doesn’t belong to the worksheet that owns the current ConditionalFormattingCollection collection, an ArgumentException occurs.

See Also