Spread Windows Forms 11.0 Product Documentation
Changed Event (BaseSheetDataModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > BaseSheetDataModel Class : Changed Event
Occurs when the user makes a change to the model that affects the data of the sheet.
Syntax
'Declaration
 
Public Event Changed As SheetDataModelEventHandler
'Usage
 
Dim instance As BaseSheetDataModel
Dim handler As SheetDataModelEventHandler
 
AddHandler instance.Changed, handler
public event SheetDataModelEventHandler Changed
Event Data

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

PropertyDescription
Gets the column index.  
Gets the number of columns.  
Gets the row index.  
Gets the number of rows.  
Gets the event type.  
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 data of the sheet.
Example
This example raises the Changed event for the model and displays that the event has fired.
private void menuItem1_Click(object sender, System.EventArgs e)
{
     model = (FarPoint.Win.Spread.Model.DefaultSheetDataModel)fpSpread1.ActiveSheet.Models.Data;
     model.ColumnCount = 5;
}
private void fpSpread1_DataModelChanged(object sender, FarPoint.Win.Spread.Model.SheetDataModelEventArgs e) 
{ 
     listBox1.Items.Add("Changed Event Fired"); 
} 
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
     model = fpSpread1.ActiveSheet.Models.Data
     model.ColumnCount = 5
End Sub

Private Sub fpSpread1_DataModelChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetDataModelEventArgs)
Handles model.Changed
     ListBox1.Items.Add("Changed Event Fired")
End Sub
See Also