[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITop10.Priority

Priority Property

Priority

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

The priority is a unique positive integer within the worksheet, so changing the priority of one rule can shift the priority values of other rules.

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}};
ITop10 firstRule = worksheet.Range["A1:A5"].FormatConditions.AddTop10();
firstRule.Interior.Color = Color.Yellow;
ITop10 secondRule = worksheet.Range["B1:B5"].FormatConditions.AddTop10();
secondRule.Interior.Color = Color.LightBlue;
secondRule.Priority = 1;
int priority = secondRule.Priority;