'Declaration
Public Sub Reset()
'Usage
Dim instance As FpSpread instance.Reset()
public void Reset()
'Declaration
Public Sub Reset()
'Usage
Dim instance As FpSpread instance.Reset()
public void Reset()
This method returns the component to the state as if the Spread object was just created with the default constructor. That default Spread object has no sheets in the component and no appearance settings set.
It resets the Sheets and the NamedStyles collections to their default values.
Caution: If you use the Reset method, everything in your component is deleted, including data, style settings, and sheets.
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(); }
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 SubButton1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Button1.Click FpSpread1.Reset() End Sub