Spread ASP.NET 6.0 Product Documentation
LoadViewState Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : LoadViewState Method


state
State saved using the SaveViewState method

Glossary Item Box

Loads a saved view state for a sheet.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub LoadViewState( _
   ByVal state As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim state As Object
 
instance.LoadViewState(state)
C# 
public virtual void LoadViewState( 
   object state
)

Parameters

state
State saved using the SaveViewState method

Remarks

You can save the current session state by calling the SaveViewState method.

Example

This example loads the saved view state from one sheet into another.
C#Copy Code
FarPoint.Web.Spread.SheetView sv;
string s;
s = "D:\\nums.txt";
sv = FpSpread1.ActiveSheetView;
sv.LoadTextFile(s, true);

object o;
o = sv.SaveViewState();

FpSpread2.ActiveSheetView.LoadViewState(o);
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
Dim s As String
s = "D:\nums.txt"
sv = FpSpread1.ActiveSheetView
sv.LoadTextFile(s, True)

Dim o As Object
o = sv.SaveViewState()

FpSpread2.ActiveSheetView.LoadViewState(o)

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.