Spread Windows Forms 9.0 Product Documentation
Changing Event (SheetViewCollection)
Example 


Occurs when a sheet is about to be added, removed, or changed in the collection.
Syntax
'Declaration
 
Public Event Changing As CollectionChangeEventHandler
'Usage
 
Dim instance As SheetViewCollection
Dim handler As CollectionChangeEventHandler
 
AddHandler instance.Changing, handler
public event CollectionChangeEventHandler Changing
Event Data

The event handler receives an argument of type CollectionChangeEventArgs containing data related to this event. The following CollectionChangeEventArgs properties provide information specific to this event.

PropertyDescription
Action  
Element  
Remarks
The event handler receives an argument of type CollectionChangeEventHandler containing data related to this event.
Example
This example creates the Changing event for the collection, which occurs when another sheet is added to the collection.
public FarPoint.Win.Spread.SheetViewCollection svc;

fpSpread1.Sheets.Count = 3;
fpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always;
FarPoint.Win.Spread.SheetView sv = new FarPoint.Win.Spread.SheetView();
sv.SheetName = "Added";
svc = fpSpread1.Sheets;
svc.Changing += new System.ComponentModel.CollectionChangeEventHandler(svc_Changing);
fpSpread1.Sheets.Add(sv);

public void svc_Changing(object sender, System.ComponentModel.CollectionChangeEventArgs e)
{
listBox1.Items.Add("Collection Changing");
}
Friend WithEvents svc As FarPoint.Win.Spread.SheetViewCollection

FpSpread1.Sheets.Count = 3
FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always
Dim sv As New FarPoint.Win.Spread.SheetView()
sv.SheetName = "Added"
svc = FpSpread1.Sheets
FpSpread1.Sheets.Add(sv)

Public Sub svc_changing(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs) Handles svc.Changing
ListBox1.Items.Add("Collection Changing")
End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetViewCollection Class
SheetViewCollection Members

 

 


Copyright © GrapeCity, inc. All rights reserved.