Spread Windows Forms 7.0 Product Documentation
Changed Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > ISheetStyleModel Interface : Changed Event


Glossary Item Box

Occurs when the style model has changed.

Syntax

Visual Basic (Declaration) 
Event Changed As SheetStyleModelEventHandler
Visual Basic (Usage)Copy Code
Dim instance As ISheetStyleModel
Dim handler As SheetStyleModelEventHandler
 
AddHandler instance.Changed, handler
C# 
event SheetStyleModelEventHandler Changed

Event Data

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

PropertyDescription
Column Gets the column index where the event occurred, or -1 if all columns were affected.
ColumnCount Gets the number of columns, or -1 if all columns were affected.
Row Gets the row index where the event occurred, or -1 if all rows were affected.
RowCount Gets the number of rows, or -1 if all rows were affected.
Type Gets the type of event that occurred.

Example

This example causes the Changed event to occur for the model.
C#Copy Code
FarPoint.Win.Spread.Model.ISheetStyleModel issm;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
issm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
issm.Changed += new FarPoint.Win.Spread.Model.SheetStyleModelEventHandler(issm_Changed);
ns.BackColor = Color.Yellow;
fpSpread1.NamedStyles.Add(ns);
issm.SetDirectInfo(0, 0, ns);


private void issm_Changed(object sender, FarPoint.Win.Spread.Model.SheetStyleModelEventArgs e)
{
label1.Text = "The Model has Changed!!";
}
Visual BasicCopy Code
Friend WithEvents issm As FarPoint.Win.Spread.Model.ISheetStyleModel

Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
Dim b As Boolean
issm = FpSpread1.ActiveSheet.Models.Style
ns.BackColor = Color.Yellow
FpSpread1.NamedStyles.Add(ns)
issm.SetDirectInfo(0, 0, ns)

Private Sub issm_Changed(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetStyleModelEventArgs) Handles issm.Changed
Label1.Text = "The Model has Changed!!"
End Sub

Requirements

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

See Also

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