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 |
---|
private void Page_Load(object sender,System.EventArgs e)
{
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;
}
private void Button1_Click(object sender,System.EventArgs e)
{
FpSpread1.Reset();
} |
Visual Basic | Copy Code |
---|
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load
If(Me.IsPostBack)Then 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
End Sub
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Button1.Click
FpSpread1.Reset()
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