Spread for ASP.NET 7.0 Product Documentation
LoadViewState Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : LoadViewState Method


savedState
Object of saved state

Glossary Item Box

Loads the view state of the Spread component.

Syntax

Visual Basic (Declaration) 
Protected Overrides Sub LoadViewState( _
   ByVal savedState As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim savedState As Object
 
instance.LoadViewState(savedState)
C# 
protected override void LoadViewState( 
   object savedState
)

Parameters

savedState
Object of saved state

Example

This example loads or saves the view state depending on its state.
C#Copy Code
private void fpSpread1SaveOrLoadSheetState(object sender, FarPoint.Web.Spread.SheetViewStateEventArgs e) 
{ 
if (e.IsSave) 
{ 
     Session["Sheets" + e.Index] = e.SheetView.SaveViewState(); 
} 
else 
{ 
     object o = Session["Sheets" + e.Index]; 
     object temp = null; 
     if (!(object.ReferenceEquals(o,temp))) 
     { 
          e.SheetView.LoadViewState(o); 
     } 
} 
e.Handled = true;  
} 
Visual BasicCopy Code
Private Sub fpSpread1SaveOrLoadSheetState(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.SheetViewStateEventArgs)
If e.IsSave Then
     Session(("Sheets" + e.Index)) = e.SheetView.SaveViewState()
Else
     Dim o As Object = Session(("Sheets" + e.Index))
     Dim temp As Object = Nothing
     If Not Object.ReferenceEquals(o, temp) Then
         e.SheetView.LoadViewState(o)
     End If
End If 
e.Handled = True
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.