Resets the Spread component to its default values, removing all settings and all sheets.
Syntax
Visual Basic (Declaration) | |
---|
Public Sub Reset() |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As FpSpread
instance.Reset() |
Remarks
Example
This example creates a spreadsheet with three sheets, changes the name of the sheets, and sets the backcolor of the first cell on each one. In a button click event, the spreadsheet is reset to its original settings.
C# | Copy Code |
---|
PrivatevoidPage_Load(objectsender,System.EventArgse)
{
If(this.IsPostBack)Return;
FpSpread1.Sheets.Count=3;
FpSpread1.Sheets[0].SheetName="One";
FpSpread1.Sheets[1].SheetName="Two";
FpSpread1.Sheets[2].SheetName="Three";
FpSpread1.Sheets[0].Cells[0,0].BackColor=Color.Yellow;
FpSpread1.Sheets[1].Cells[0,0].BackColor=Color.Yellow;
FpSpread1.Sheets[2].Cells[0,0].BackColor=Color.Yellow;
}
PrivatevoidButton1_Click(objectsender,System.EventArgse)
{
FpSpread1.Reset();
} |
Visual Basic | Copy Code |
---|
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
If(Me.IsPostBack)ThenReturn
FpSpread1.Sheets.Count=3
FpSpread1.Sheets(0).SheetName="One"
FpSpread1.Sheets(1).SheetName="Two"
FpSpread1.Sheets(2).SheetName="Three"
FpSpread1.Sheets(0).Cells(0,0).BackColor=Color.Yellow
FpSpread1.Sheets(1).Cells(0,0).BackColor=Color.Yellow
FpSpread1.Sheets(2).Cells(0,0).BackColor=Color.Yellow
EndSub
PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click
FpSpread1.Reset()
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