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


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > TopRankedValuesConditionalFormattingRule Class : IsPercent Property
Gets or sets whether this conditional formatting rule is used as a percentage.
Syntax
'Declaration
 
Public Property IsPercent As Boolean
'Usage
 
Dim instance As TopRankedValuesConditionalFormattingRule
Dim value As Boolean
 
instance.IsPercent = value
 
value = instance.IsPercent
public bool IsPercent {get; set;}

Property Value

true if this instance is a percent; otherwise, false.
Example
This example sets the IsPercent 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