[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorScale.Priority

Priority Property

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. A lower priority value indicates that the rule is evaluated earlier.

Priority values are unique within a worksheet. When the priority of a rule is changed by using Priority, the priority values of other rules on the worksheet may be shifted accordingly.

Declaration
int Priority { get; set; }
Property Priority As Integer
Examples
worksheet.Range["A1:B5"].Value = new object[,] {{10, 5}, {30, 15}, {20, 25}, {50, 35}, {40, 45}};
IColorScale firstRule = worksheet.Range["A1:A5"].FormatConditions.AddColorScale(ColorScaleType.TwoColorScale);
IColorScale secondRule = worksheet.Range["B1:B5"].FormatConditions.AddColorScale(ColorScaleType.ThreeColorScale);
secondRule.Priority = 1;
int priority = secondRule.Priority;