Spread for ASP.NET 11 Product Documentation
Rank Property (TopRankedValuesConditionalFormattingRule)
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > TopRankedValuesConditionalFormattingRule Class : Rank Property
Gets or sets the rank.
Syntax
'Declaration
 
Public Property Rank As Integer
'Usage
 
Dim instance As TopRankedValuesConditionalFormattingRule
Dim value As Integer
 
instance.Rank = value
 
value = instance.Rank
public int Rank {get; set;}

Property Value

The rank.
Example
This example sets the Rank property.
if (this.IsPostBack) return;

FpSpread1.Sheets[0].Cells[0, 0].Value = 3;
FpSpread1.Sheets[0].Cells[0, 1].Value = 50;
FpSpread1.Sheets[0].Cells[0, 2].Value = 1;
FpSpread1.Sheets[0].Cells[1, 0].Value = 22;
FpSpread1.Sheets[0].Cells[1, 1].Value = 10;
FpSpread1.Sheets[0].Cells[1, 2].Value = 70;
FpSpread1.Sheets[0].Cells[2, 0].Value = 45;
FpSpread1.Sheets[0].Cells[2, 1].Value = 20;
FpSpread1.Sheets[0].Cells[2, 2].Value = 65;

// TopRank CF
FarPoint.Web.Spread.TopRankedValuesConditionalFormattingRule topRank = new FarPoint.Web.Spread.TopRankedValuesConditionalFormattingRule();
topRank.BackColor = Color.Tomato;
topRank.Rank = 2;
topRank.IsPercent = true;
FpSpread1.ActiveSheetView.SetConditionalFormatting(0, 0, 3, 3, topRank);
If (Me.IsPostBack) Then Return
FpSpread1.Sheets(0).Cells(0, 0).Value = 3
FpSpread1.Sheets(0).Cells(0, 1).Value = 50
FpSpread1.Sheets(0).Cells(0, 2).Value = 1
FpSpread1.Sheets(0).Cells(1, 0).Value = 22
FpSpread1.Sheets(0).Cells(1, 1).Value = 10
FpSpread1.Sheets(0).Cells(1, 2).Value = 70
FpSpread1.Sheets(0).Cells(2, 0).Value = 45
FpSpread1.Sheets(0).Cells(2, 1).Value = 20
FpSpread1.Sheets(0).Cells(2, 2).Value = 65

'TopRank CF
Dim topRank As New FarPoint.Web.Spread.TopRankedValuesConditionalFormattingRule()
topRank.BackColor = Drawing.Color.Tomato
topRank.Rank = 2
topRank.IsPercent = True
FpSpread1.ActiveSheetView.SetConditionalFormatting(0, 0, 3, 3, topRank)
See Also

Reference

TopRankedValuesConditionalFormattingRule Class
TopRankedValuesConditionalFormattingRule Members