[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IIconSetCondition

IIconSetCondition Interface

Represents an icon set conditional formatting rule.

An IIconSetCondition applies icon-based conditional formatting to a range and lets you configure the icon set, criteria thresholds, display order, and target range for the rule.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IIconSetCondition
Public Interface IIconSetCondition
Examples
worksheet.Range["A1:A5"].Value = new object[,] {{10}, {30}, {50}, {70}, {90}};
IIconSetCondition condition = worksheet.Range["A1:A5"].FormatConditions.AddIconSetCondition();
condition.IconSet = workbook.IconSets[IconSetType.Icon3Symbols];
condition.IconCriteria[1].Value = 50;
condition.IconCriteria[2].Value = 70;

Properties

Name Description
AppliesTo

Gets or sets an IRange that specifies the cell range to which the formatting rule is applied.

Use the AppliesTo property to change the range associated with this icon set conditional formatting rule.

Custom

Gets a Boolean value indicating whether this is a custom icon set condition.

An icon set rule is custom when one or more criteria use an icon that does not come from the rule's selected IIconSet, including NoCellIcon.

IconCriteria

Gets an IIconCriteria collection, which represents the set of criteria for an icon set conditional formatting rule.

Each item in the returned collection represents the threshold settings for one icon in the current icon set.

IconSet

Gets or sets the icon set used in the conditional format.

PercentileValues

Gets or sets a Boolean value indicating if the thresholds for an icon set conditional format are determined by using percentiles.

This property returns false if not every threshold is set to percentile. Use the PercentileValues property to change all threshold types to percentile at once.

Priority

Gets or sets the priority value of the conditional formatting rule.

The priority determines the order of evaluation when multiple conditional formatting rules exist in a worksheet. Priority values are unique within the worksheet, so changing the priority of one rule can shift the priority values of other rules.

ReverseOrder

Gets or sets a Boolean value indicating if the order of icons is reversed for an icon set.

This property is true when the icon set conditional format displays icons in reverse order. This property is false when the default icon order is used.

ShowIconOnly

Gets or sets a Boolean value indicating if only the icon is displayed for an icon set conditional format.

This property is true when cells that use this icon set rule display only the icon. This property is false when the icon is displayed together with the cell value.

StopIfTrue

Gets a Boolean value that determines whether additional formatting rules on the cell should not be evaluated after this icon set rule evaluates to true.

If this property returns true, later conditional formatting rules are not evaluated for cells where this icon set rule evaluates to true. If it returns false, subsequent rules can continue to be evaluated.

Type

Gets the type of this conditional format.

For an icon set conditional formatting rule, this property returns IconSets.

Methods

Name Description
Delete()

Deletes this conditional format.

Use this method to remove the current icon set conditional formatting rule from the worksheet.

FromJson(string)

Loads an icon set conditional formatting rule from a JSON string into this object.

Updates this icon set conditional formatting rule by deserializing the specified JSON content. The JSON string should represent an icon set conditional format, such as one generated by ToJson().

SetFirstPriority()

Sets the priority value for this conditional formatting rule to "1" so that it will be evaluated before all other rules on the worksheet.

SetLastPriority()

Sets the evaluation order for this conditional formatting rule so it is evaluated after all other rules on the worksheet.

ToJson()

Generates a JSON string from the conditional format.

The returned string contains the serialized definition of this icon set conditional formatting rule.