Spread for ASP.NET 7.0 Product Documentation
ReferenceStyle Enumeration
Example  See Also  Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace : ReferenceStyle Enumeration


Glossary Item Box

Specifies the reference style in formulas and custom names in the sheet.

Syntax

Visual Basic (Declaration) 
Public Enum ReferenceStyle 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As ReferenceStyle
C# 
public enum ReferenceStyle : System.Enum 

Members

MemberDescription
A1Uses letters and numbers for column and row coordinates; uses dollar sign ($) for absolute coordinates
R1C1Uses "R" and number for row, "C" and number for column coordinates; uses brackets [ ] for relative coordinates

Example

This example uses three Command Buttons, each of which uses a different reference style to multiply the values in two cells in the sheet. The type of reference style used is returned to a list box.
C#Copy Code
private void Page_Load(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.SetValue(0,0,5);
FpSpread1.ActiveSheetView.SetValue(0,1,15);
}

private void A1_Click(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)");
FarPoint.Web.Spread.Model.ReferenceStyle refstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
}

private void R1C1_Click(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)");
FarPoint.Web.Spread.Model.ReferenceStyle refstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
}
Visual BasicCopy Code
Private Sub Page_Load(ByVal sender As System.Object,ByVal e AsSystem.EventArgs)Handles MyBase.Load
FpSpread1.ActiveSheetView.SetValue(0,0,5)
FpSpread1.ActiveSheetView.SetValue(0,1,15)
End Sub

Private Sub A1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles A1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)")
Dim refstyle As FarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
End Sub

Private Sub R1C1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles R1C1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)")
Dim refstyle As FarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
End Sub

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.Model.ReferenceStyle

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.