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


Glossary Item Box

Occurs after the user modifies data in a cell.

Syntax

Visual Basic (Declaration) 
Public Event Change As ChangeEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As ChangeEventHandler
 
AddHandler instance.Change, handler
C# 
public event ChangeEventHandler Change

Event Data

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

PropertyDescription
Column Gets the column index of the cell that is changed.
Row Gets the row index of the cell that is changed.
View Gets the view that contains the cell that is changed.

Remarks

This event is raised by the OnChange method when the user modifies data in the cell.

For more details on the individual event arguments, refer to ChangeEventArgs members.

This event does not occur if the cell is already in Edit mode when the user double-clicks the cell.

This event is not raised on a paste; the DefaultSheetDataModel.Changed event is raised on a paste though.

Example

This example raises the Change event when the user changes the data in a cell.
C#Copy Code
fpSpread1.ActiveSheet.SetValue(0, 0, "Change Me");
Label1.Text = "Change the data in the first cell then move focus to another cell.";

private void fpSpread1_Change(object sender, FarPoint.Win.Spread.ChangeEventArgs e)
{
     ListBox1.Items.Add("Change event fired!");
}
Visual BasicCopy Code
Fpspread1.ActiveSheet.SetValue(0, 0, "Change Me")
Label1.Text = "Change the data in the first cell then move focus to another cell."

Private Sub FpSpread1_Change(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChangeEventArgs) Handles FpSpread1.Change
     ListBox1.Items.Add("Change 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.