Spread Windows Forms 6.0 Product Documentation
SheetDataModelEventType Enumeration
Example  See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace : SheetDataModelEventType Enumeration


Glossary Item Box

Specifies the type of Change event that has occurred for an axis model for the sheet.

Syntax

Visual Basic (Declaration) 
Public Enum SheetDataModelEventType 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As SheetDataModelEventType
C# 
public enum SheetDataModelEventType : System.Enum 

Members

MemberDescription
AggregationUpdateIndicates that the aggregation data model has been updated
CellsUpdatedIndicates that cells with cell data have been updated
ColumnsAddedIndicates that columns have been added
ColumnsRemovedIndicates that columns have been removed
ModelUpdatedIndicates that the sheet data model has been updated
RowsAddedIndicates that rows have been added
RowsRemovedIndicates that rows have been removed

Example

This example causes the Changed event to occur for the SheetDataModel and the type for the event is returned to a list box.
C#Copy Code
FarPoint.Win.Spread.Model.DefaultSheetDataModel defModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5);

private void Form1_Load(object sender, System.EventArgs e)
{
    fpSpread1.ActiveSheet.Models.Data = defModel;
    this.defModel.Changed += new FarPoint.Win.Spread.Model.SheetDataModelEventHandler(this.defModel_Changed);
}

private void menuItem1_Click(object sender, System.EventArgs e)
{
    fpSpread1.ActiveSheet.Models.Data = defModel;
    defModel.SetValue(0, 0, "CellsUpdated");
}

private void defModel_Changed(object sender, FarPoint.Win.Spread.Model.SheetDataModelEventArgs e)
{
    switch (e.Type)
    {
        case FarPoint.Win.Spread.Model.SheetDataModelEventType.CellsUpdated:
            listBox1.Items.Add(e.Type.ToString());
            break;
        case FarPoint.Win.Spread.Model.SheetDataModelEventType.RowsAdded:
            listBox1.Items.Add(e.Type.ToString());
            break;
        case FarPoint.Win.Spread.Model.SheetDataModelEventType.RowsRemoved:
            listBox1.Items.Add(e.Type.ToString());
            break;
        case FarPoint.Win.Spread.Model.SheetDataModelEventType.ColumnsAdded:
            listBox1.Items.Add(e.Type.ToString());
            break;
        case FarPoint.Win.Spread.Model.SheetDataModelEventType.ColumnsRemoved:
            listBox1.Items.Add(e.Type.ToString());
            break;
        case FarPoint.Win.Spread.Model.SheetDataModelEventType.ModelUpdated:
            listBox1.Items.Add(e.Type.ToString());
            break;
    }
}
Visual BasicCopy Code
Friend WithEvents defModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5)

Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
    FpSpread1.ActiveSheet.Models.Data = defModel
    defModel.SetValue(0, 0, "CellsUpdated")
End Sub

Private Sub defModel_Changed(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetDataModelEventArgs) Handles
defModel.Changed
Select Case e.Type
    Case FarPoint.Win.Spread.Model.SheetDataModelEventType.CellsUpdated
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetDataModelEventType.RowsAdded
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetDataModelEventType.RowsRemoved
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetDataModelEventType.ColumnsAdded
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetDataModelEventType.ColumnsRemoved
        ListBox1.Items.Add(e.Type.ToString())
    Case FarPoint.Win.Spread.Model.SheetDataModelEventType.ModelUpdated
        ListBox1.Items.Add(e.Type.ToString())
End Select
End Sub

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.Model.SheetDataModelEventType

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.