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


Glossary Item Box

Saves the current view state of the sheet.

Syntax

Visual Basic (Declaration) 
Public Overridable Function SaveViewState() As Object
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Object
 
value = instance.SaveViewState()
C# 
public virtual object SaveViewState()

Return Value

Object in which to save view state

Remarks

Once you have saved the session state by calling the SaveViewState method, you can load the session state by calling the LoadViewState 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 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.