Spread Windows Forms 6.0 Product Documentation
Changed Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetViewCollection Class : Changed Event


Glossary Item Box

Occurs when a sheet is added, removed, or changed in the collection.

Syntax

Visual Basic (Declaration) 
Public Event Changed As CollectionChangeEventHandler
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim handler As CollectionChangeEventHandler
 
AddHandler instance.Changed, handler
C# 
public event CollectionChangeEventHandler Changed

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 Change event for the collection, which occurs when another sheet is added to the collection.
C#Copy Code
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.Changed += new System.ComponentModel.CollectionChangeEventHandler(svc_Changed);
fpSpread1.Sheets.Add(sv);

public void svc_Changed(object sender, System.ComponentModel.CollectionChangeEventArgs e)
{
listBox1.Items.Add("Collection Changed");
}
Visual BasicCopy Code
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_changed(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs) Handles svc.Changed
ListBox1.Items.Add("Collection Changed")
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.