Spread for ASP.NET 10 Product Documentation
ConditionalFormattingIconValue Constructor(Object,ConditionalFormattingValueType,Boolean)
Example 


The value.
The type. Note: ConditionalFormattingIconValue accepts only Number, Percent, Percentile, and Formula values of ConditionalFormattingValueType.
if set to true is greater or equal.
Initializes a new instance of the ConditionalFormattingIconValue class.
Syntax
'Declaration
 
Public Function New( _
   ByVal value As Object, _
   ByVal type As ConditionalFormattingValueType, _
   ByVal isGreaterOrEquals As Boolean _
)
'Usage
 
Dim value As Object
Dim type As ConditionalFormattingValueType
Dim isGreaterOrEquals As Boolean
 
Dim instance As New ConditionalFormattingIconValue(value, type, isGreaterOrEquals)
public ConditionalFormattingIconValue( 
   object value,
   ConditionalFormattingValueType type,
   bool isGreaterOrEquals
)

Parameters

value
The value.
type
The type. Note: ConditionalFormattingIconValue accepts only Number, Percent, Percentile, and Formula values of ConditionalFormattingValueType.
isGreaterOrEquals
if set to true is greater or equal.
Example
This example creates an icon rule.
protected void Page_Load(object sender, EventArgs e)
        {
if (IsPostBack) return;
FpSpread1.Sheets[0].Cells[0, 0].Value = 3;
FpSpread1.Sheets[0].Cells[1, 0].Value = 2;
FpSpread1.Sheets[0].Cells[1, 1].Value = 10;
FpSpread1.Sheets[0].Cells[0, 2].Value = 1;
//IconSetConditionalFormatting
FarPoint.Web.Spread.IconSetConditionalFormattingRule c = new FarPoint.Web.Spread.IconSetConditionalFormattingRule(FarPoint.Web.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles);
c.IconRuleSet.Add(new FarPoint.Web.Spread.ConditionalFormattingIconValue(10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number, true));
FarPoint.Web.Spread.ConditionalFormatting IconSetCF = new FarPoint.Web.Spread.ConditionalFormatting(new FarPoint.Web.Spread.Model.CellRange(0, 0, 2, 2), c);
//FpSpread1.Sheets[0].SetConditionalFormatting(1,1,c);
FpSpread1.Sheets[0].ConditionalFormatting.Add(IconSetCF);
        }
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (IsPostBack) Then
            Return
        End If
FpSpread1.Sheets(0).Cells(0, 0).Value = 3
FpSpread1.Sheets(0).Cells(1, 0).Value = 2
FpSpread1.Sheets(0).Cells(1, 1).Value = 10
FpSpread1.Sheets(0).Cells(0, 2).Value = 1
'IconSetConditionalFormatting
Dim c As New FarPoint.Web.Spread.IconSetConditionalFormattingRule(FarPoint.Web.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles)
c.IconRuleSet.Add(New FarPoint.Web.Spread.ConditionalFormattingIconValue(10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number, True))
Dim IconSetCF As New FarPoint.Web.Spread.ConditionalFormatting(New FarPoint.Web.Spread.Model.CellRange(0, 0, 2, 2), c)
'FpSpread1.Sheets(0).SetConditionalFormatting(1, 1, c)
FpSpread1.Sheets(0).ConditionalFormatting.Add(IconSetCF)
End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

ConditionalFormattingIconValue Class
ConditionalFormattingIconValue Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.