Spread for ASP.NET 7.0 Product Documentation
ActiveSheetView Property
See Also  Example Support Options
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
private void Page_Load(object sender,System.EventArgs e)
{
if(this.IsPostBack) return;

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

private void Button1_Click(object sender,System.EventArgs e)
{
object val=FpSpread1.ActiveSheetView.Cells[0,0].Value;
string reason;
reason=FpSpread1.Validate(val,0,0);
if(reason==null||reason==String.Empty){
TextBox1.Text="Valid";
}else{
TextBox1.Text=reason;
}
}
VB.NETCopy Code
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load

If(Me.IsPostBack)Then Return
FpSpread1.ActiveSheetView.Columns(0).CellType=New FarPoint.Web.Spread.CurrencyCellType()
FpSpread1.ActiveSheetView.SetValue(0,0,108.89)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Button1.Click
Dim val As Object=FpSpread1.ActiveSheetView.Cells[0,0].Value
Dim reason As String
reason=FpSpread1.Validate(val,0,0)
If(reason=Nothing Or reason=String.Empty)Then
TextBox1.Text="Valid"
Else
TextBox1.Text=reason
End If
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.