Spread ASP.NET 6.0 Product Documentation
ReferenceStyle Enumeration
Example  See Also  Send Feedback
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
privatevoidPage_Load(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.SetValue(0,0,5);
FpSpread1.ActiveSheetView.SetValue(0,1,15);
}

privatevoidA1_Click(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)");
FarPoint.Web.Spread.Model.ReferenceStylerefstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
}

privatevoidR1C1_Click(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1;
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)");
FarPoint.Web.Spread.Model.ReferenceStylerefstyle;
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle;
ListBox1.Items.Add(refstyle.ToString());
}
Visual BasicCopy Code
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
FpSpread1.ActiveSheetView.SetValue(0,0,5)
FpSpread1.ActiveSheetView.SetValue(0,1,15)
EndSub

PrivateSubA1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesA1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.A1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(A1*B1)")
DimrefstyleAsFarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
EndSub

PrivateSubR1C1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesR1C1.Click
FpSpread1.ActiveSheetView.ReferenceStyle=FarPoint.Web.Spread.Model.ReferenceStyle.R1C1
FpSpread1.ActiveSheetView.SetFormula(0,3,"(R1C1*R1C2)")
DimrefstyleAsFarPoint.Web.Spread.Model.ReferenceStyle
refstyle=FpSpread1.ActiveSheetView.ReferenceStyle
ListBox1.Items.Add(refstyle.ToString())
EndSub

Inheritance Hierarchy

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

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.