Spread for ASP.NET 10 Product Documentation
ThreeColorScaleConditionalFormattingRule Constructor(ConditionalFormattingColorValue,ConditionalFormattingColorValue,ConditionalFormattingColorValue)
Example 


The minimum value. Note: The minimum value only accepts the ConditionalFormattingColorValue object which has a Type value of Min, Number, Percent, Formula, or Pecentile.
The middle value. Note: The middle value only accepts the ConditionalFormattingColorValue object which has a Type value of Number, Percent, Formula, or Pecentile.
The maximum value. Note: The maximum value only accepts the ConditionalFormattingColorValue object which has a Type value of Max, Number, Percent, Formula, or Pecentile.
Initializes a new instance of the ThreeColorScaleConditionalFormattingRule class.
Syntax
'Declaration
 
Public Function New( _
   ByVal minValue As ConditionalFormattingColorValue, _
   ByVal midValue As ConditionalFormattingColorValue, _
   ByVal maxValue As ConditionalFormattingColorValue _
)
'Usage
 
Dim minValue As ConditionalFormattingColorValue
Dim midValue As ConditionalFormattingColorValue
Dim maxValue As ConditionalFormattingColorValue
 
Dim instance As New ThreeColorScaleConditionalFormattingRule(minValue, midValue, maxValue)
public ThreeColorScaleConditionalFormattingRule( 
   ConditionalFormattingColorValue minValue,
   ConditionalFormattingColorValue midValue,
   ConditionalFormattingColorValue maxValue
)

Parameters

minValue
The minimum value. Note: The minimum value only accepts the ConditionalFormattingColorValue object which has a Type value of Min, Number, Percent, Formula, or Pecentile.
midValue
The middle value. Note: The middle value only accepts the ConditionalFormattingColorValue object which has a Type value of Number, Percent, Formula, or Pecentile.
maxValue
The maximum value. Note: The maximum value only accepts the ConditionalFormattingColorValue object which has a Type value of Max, Number, Percent, Formula, or Pecentile.
Example
This example creates a color rule.
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;
FpSpread1.Sheets[0].Cells[1, 2].Value = 20;
FpSpread1.Sheets[0].Cells[0, 1].Value = 15;

FarPoint.Web.Spread.ConditionalFormattingColorValue cvalue = new FarPoint.Web.Spread.ConditionalFormattingColorValue(Color.Orange, 1, FarPoint.Web.Spread.ConditionalFormattingValueType.Number);
FarPoint.Web.Spread.ConditionalFormattingColorValue cvalue1 = new FarPoint.Web.Spread.ConditionalFormattingColorValue(Color.BurlyWood, 10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number);
FarPoint.Web.Spread.ConditionalFormattingColorValue cvalue2 = new FarPoint.Web.Spread.ConditionalFormattingColorValue(Color.Crimson, 20, FarPoint.Web.Spread.ConditionalFormattingValueType.Number);
FarPoint.Web.Spread.ThreeColorScaleConditionalFormattingRule rule = new FarPoint.Web.Spread.ThreeColorScaleConditionalFormattingRule(cvalue, cvalue1, cvalue2);
FpSpread1.Sheets[0].SetConditionalFormatting(0,0, 3, 3, rule);
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
FpSpread1.Sheets(0).Cells(1, 2).Value = 20
FpSpread1.Sheets(0).Cells(0, 1).Value = 15

Dim cvalue As New FarPoint.Web.Spread.ConditionalFormattingColorValue(Color.Orange, 1, FarPoint.Web.Spread.ConditionalFormattingValueType.Number)
Dim cvalue1 As New FarPoint.Web.Spread.ConditionalFormattingColorValue(Color.BurlyWood, 10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number)
Dim cvalue2 As New FarPoint.Web.Spread.ConditionalFormattingColorValue(Color.Crimson, 20, FarPoint.Web.Spread.ConditionalFormattingValueType.Number)
Dim Rule As New FarPoint.Web.Spread.ThreeColorScaleConditionalFormattingRule(cvalue, cvalue1, cvalue2)
FpSpread1.Sheets(0).SetConditionalFormatting(0, 0, 3, 3, Rule)
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

ThreeColorScaleConditionalFormattingRule Class
ThreeColorScaleConditionalFormattingRule Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.