Back to Devexpress

ConditionalFormattingCollection.GetConditionalFormattings(CellRange) Method

officefileapi-devexpress-dot-spreadsheet-dot-conditionalformattingcollection-dot-getconditionalformattings-x28-devexpress-dot-spreadsheet-dot-cellrange-x29.md

latest2.4 KB
Original Source

ConditionalFormattingCollection.GetConditionalFormattings(CellRange) Method

Obtains conditional formatting rules applied to the specified cell range.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
IEnumerable<ConditionalFormatting> GetConditionalFormattings(
    CellRange range
)
vb
Function GetConditionalFormattings(
    range As CellRange
) As IEnumerable(Of ConditionalFormatting)

Parameters

NameTypeDescription
rangeCellRange

A cell range for which conditional formatting rules are obtained.

|

Returns

TypeDescription
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

ConditionalFormattingCollection Interface

ConditionalFormattingCollection Members

DevExpress.Spreadsheet Namespace