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


Glossary Item Box

Gets or sets the first formula.

Syntax

Visual Basic (Declaration) 
Public Property FirstFormula As String
Visual Basic (Usage)Copy Code
Dim instance As BetweenValuesConditionalFormattingRule
Dim value As String
 
instance.FirstFormula = value
 
value = instance.FirstFormula
C# 
public string FirstFormula {get; set;}

Property Value

The first formula.

Example

This example specifies the values using formulas.
C#Copy Code
protected void Page_Load(object sender, EventArgs e)
{
if (this.IsPostBack) return;
FpSpread1.Sheets[0].Cells[0, 0].Value = 3;
FpSpread1.Sheets[0].Cells[0, 1].Value = 2;
FpSpread1.Sheets[0].Cells[0, 2].Value = 1;
FpSpread1.Sheets[0].Cells[0, 3].Value = 1;
FpSpread1.Sheets[0].Cells[1, 0].Value = 2;
FpSpread1.Sheets[0].Cells[1, 1].Value = 6;

FarPoint.Web.Spread.BetweenValuesConditionalFormattingRule between = new FarPoint.Web.Spread.BetweenValuesConditionalFormattingRule(false, "=B1+B2", true, "=C1+D1", true);
between.BackColor = System.Drawing.Color.Bisque;
between.FirstFormula = "=B1+B2";
between.SecondFormula = "=C1+D1";
between.StopIfTrue = false;
FpSpread1.ActiveSheetView.SetConditionalFormatting(1, 1, between);
}
VB.NETCopy Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
If (IsPostBack) Then
 Return
End If
FpSpread1.Sheets(0).Cells(0, 0).Value = 3
FpSpread1.Sheets(0).Cells(0, 1).Value = 2
FpSpread1.Sheets(0).Cells(0, 2).Value = 1
FpSpread1.Sheets(0).Cells(0, 3).Value = 1
FpSpread1.Sheets(0).Cells(1, 0).Value = 2
FpSpread1.Sheets(0).Cells(1, 1).Value = 6

Dim between as New FarPoint.Web.Spread.BetweenValuesConditionalFormattingRule(false, "=B1+B2", true, "=C1+D1", true)
between.BackColor = System.Drawing.Color.Bisque
between.FirstFormula = "=B1+B2"
between.SecondFormula = "=C1+D1"
between.StopIfTrue = false
FpSpread1.ActiveSheetView.SetConditionalFormatting(1, 1, between)
End Sub

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.