Spread for ASP.NET 7.0 Product Documentation
MaxValue Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ThreeColorScaleConditionalFormattingRule Class : MaxValue Property


Glossary Item Box

Gets or sets the maximum value. Note: The maximum value only accepts the ConditionalFormattingColorValue object which has a Type property value of Max, Number, Percent, Formula, or Pecentile.

Syntax

Visual Basic (Declaration) 
Public Overrides Property MaxValue As ConditionalFormattingColorValue
Visual Basic (Usage)Copy Code
Dim instance As ThreeColorScaleConditionalFormattingRule
Dim value As ConditionalFormattingColorValue
 
instance.MaxValue = value
 
value = instance.MaxValue
C# 
public override ConditionalFormattingColorValue MaxValue {get; set;}

Example

This example sets the MaxValue property.
C#Copy Code
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;
FarPoint.Web.Spread.ThreeColorScaleConditionalFormattingRule three = new FarPoint.Web.Spread.ThreeColorScaleConditionalFormattingRule();
three.MidValue = new FarPoint.Web.Spread.ConditionalFormattingColorValue(Drawing.Color.Aqua, 5, FarPoint.Web.Spread.ConditionalFormattingValueType.Number);
three.MinValue = new FarPoint.Web.Spread.ConditionalFormattingColorValue(Drawing.Color.BlueViolet, 1, FarPoint.Web.Spread.ConditionalFormattingValueType.Number);
three.MaxValue = new FarPoint.Web.Spread.ConditionalFormattingColorValue(Drawing.Color.Blue, 10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number);
FpSpread1.Sheets[0].SetConditionalFormatting(0, 0, 3, 3, three);
VB.NETCopy Code
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
Dim three As New FarPoint.Web.Spread.ThreeColorScaleConditionalFormattingRule()
three.MidValue = New FarPoint.Web.Spread.ConditionalFormattingColorValue(Drawing.Color.Aqua, 5, FarPoint.Web.Spread.ConditionalFormattingValueType.Number)
three.MinValue = New FarPoint.Web.Spread.ConditionalFormattingColorValue(Drawing.Color.BlueViolet, 1, FarPoint.Web.Spread.ConditionalFormattingValueType.Number)
three.MaxValue = New FarPoint.Web.Spread.ConditionalFormattingColorValue(Drawing.Color.Blue, 10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number)
FpSpread1.Sheets(0).SetConditionalFormatting(0, 0, 3, 3, three)

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.