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


Glossary Item Box

Occurs when the user makes a change to the model that affects the selection of cells of the sheet.

Syntax

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

Event Data

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

PropertyDescription
Column Gets the column index of the selection.
ColumnCount Gets the number of columns in the selection.
Row Gets the row index of the selection.
RowCount Gets the number of rows in the selection.

Remarks

When a class is derived from this abstract class, this event occurs after the user makes a change to the model that affects the selection of cells of the sheet.

Example

This example causes the Changed event to occur for the model.
C#Copy Code
private void menuItem23_Click(object sender, System.EventArgs e)
{
model = (FarPoint.Win.Spread.Model.BaseSheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection;
model.SetSelection(0, 0, 3, 3);
}
private void fpSpread1_SelectionModelChanged(object sender, FarPoint.Win.Spread.Model.SheetSelectionModelEventArgs e) 
{ 
listBox1.Items.Add("Changed Event Fired"); 
} 
Visual BasicCopy Code
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
model = FpSpread1.ActiveSheet.Models.Selection
model.SetSelection(0, 0, 2, 2)
End Sub

Private Sub FpSpread1_SelectionModelChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetSelectionModelEventArgs)
Handles model.Changed
ListBox1.Items.Add("Changed Event Fired")
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.