Spread ASP.NET 6.0 Product Documentation
ActiveSheetView Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : ActiveSheetView Property


Glossary Item Box

Gets the currently selected sheet for the Spread component.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property ActiveSheetView As SheetView
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim value As SheetView
 
value = instance.ActiveSheetView
C# 
public SheetView ActiveSheetView {get;}

Property Value

SheetView object containing the currently selected sheet

Remarks

This property is available at run time only.

When the active sheet changes, the ActiveSheetChanged event occurs.

Example

This example creates a column of Currency cells, sets a value in the first cell, then checks whether the value is valid and returns the result to a text box.
C#Copy Code
PrivatevoidPage_Load(objectsender,System.EventArgse)
{
If(this.IsPostBack)Return;

FpSpread1.ActiveSheetView.Columns[0].CellType=NewFarPoint.Web.Spread.CurrencyCellType();
FpSpread1.ActiveSheetView.SetValue(0,0,108.89);
}

PrivatevoidButton1_Click(objectsender,System.EventArgse)
{
objectval=FpSpread1.ActiveSheetView.Cells[0,0].Value;
stringreason;
reason=FpSpread1.Validate(val,0,0);
If(reason==null||reason==String.Empty){
TextBox1.Text="Valid";
}Else{
TextBox1.Text=reason;
}
}
Visual BasicCopy Code
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load

If(Me.IsPostBack)ThenReturn

FpSpread1.ActiveSheetView.Columns(0).CellType=NewFarPoint.Web.Spread.CurrencyCellType()
FpSpread1.ActiveSheetView.SetValue(0,0,108.89)

EndSub

PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click
DimvalAsObject=FpSpread1.ActiveSheetView.Cells[0,0].Value
DimreasonAsString
reason=FpSpread1.Validate(val,0,0)
If(reason=NothingOrreason=String.Empty)Then
TextBox1.Text="Valid"
Else
TextBox1.Text=reason
EndIf
EndSub

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.