[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IFormatConditions.Item

this Property

this[int]

Gets the conditional format at the specified zero-based index.

Use this indexer to access an existing conditional format in the collection for a range.

Declaration
object this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As Object
Parameters
Type Name Description
int index

The zero-based index of the conditional format in the collection.

Examples
IRange range = worksheet.Range["A1:A5"];
range.Value = new object[,] {{1}, {3}, {5}, {7}, {9}};
IFormatCondition condition1 = (IFormatCondition) range.FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.Between, 1, 5);
condition1.Interior.Color = Color.Yellow;
object condition = range.FormatConditions[0];
Exceptions
Type Condition
ArgumentOutOfRangeException

if index is less than 0 or greater than or equal to Count.