Spread Windows Forms 10.0 Product Documentation
Changed Event (BaseSheetStyleModel)
Example 


Occurs when the user makes a change to the model that affects the style of the sheet.
Syntax
'Declaration
 
Public Event Changed As SheetStyleModelEventHandler
'Usage
 
Dim instance As BaseSheetStyleModel
Dim handler As SheetStyleModelEventHandler
 
AddHandler instance.Changed, handler
public 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
ColumnGets the column index where the event occurred, or -1 if all columns were affected.  
ColumnCountGets the number of columns, or -1 if all columns were affected.  
RowGets the row index where the event occurred, or -1 if all rows were affected.  
RowCountGets the number of rows, or -1 if all rows were affected.  
TypeGets the type of event that occurred.  
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 style of the sheet.
Example
This example causes the Changed event to occur for the model.
private void menuItem11_Click(object sender, System.EventArgs e)
{
    FarPoint.Win.Spread.Model.BaseSheetStyleModel styleModel;
    FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
    sInfo.BackColor = Color.LightBlue;
    styleModel = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
    styleModel.AltRowCount = 3;
    styleModel.SetDirectAltRowInfo(1, sInfo);
}

private void fpSpread1_StyleModelChanged(object sender, FarPoint.Win.Spread.Model.SheetStyleModelEventArgs e) 
{ 
    listBox1.Items.Add("Changed Event Fired"); 
}
Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click
    Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
    sInfo.BackColor = Color.LightBlue
    model = FpSpread1.ActiveSheet.Models.Style
    model.AltRowCount = 3
    model.SetDirectAltRowInfo(1, sInfo)
End Sub

Private Sub FpSpread1_StyleModelChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.Model.SheetStyleModelEventArgs)
Handles model.Changed
    stBox1.Items.Add("Changed Event Fired")
End Sub
Requirements

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

See Also

Reference

BaseSheetStyleModel Class
BaseSheetStyleModel Members

 

 


Copyright © GrapeCity, inc. All rights reserved.