MESCIUS SPREAD for ASP.NET 10.0J
NameChanged イベント (DefaultSheetDataModel)

データモデルの名前が変更されたときに発生します。
構文
'Declaration
 
Public Event NameChanged As EventHandler
public event EventHandler NameChanged
次のサンプルコードは、モデルの名前の変更をユーザーに知らせます。
FarPoint.Web.Spread.Model.DefaultSheetDataModel dsdm;

private void PageL_oad(object sender, System.EventArgs e)
{
    dsdm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
    FpSpread1.Tab.TabControlPolicy = FarPoint.Web.Spread.TabControlPolicy.Always;
    Response.Write(dsdm.Name);
    dsdm.NameChanged += new EventHandler(dsdmNameChanged);
}

private void Button1_Click(object sender, System.EventArgs e)
{
    FpSpread1.Sheets[0].SheetName = "Test";
}

private void dsdmNameChanged(object sender, EventArgs e)
{
    Response.Write("alert('The name of the model has changed!!')");
}
Friend WithEvents dsdm As FarPoint.Web.Spread.Model.DefaultSheetDataModel

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    dsdm = FpSpread1.ActiveSheetView.DataModel
    ins = dsdm
    FpSpread1.Tab.TabControlPolicy = FarPoint.Web.Spread.TabControlPolicy.Always
    Response.Write(dsdm.Name)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    FpSpread1.Sheets(0).SheetName = "Test"
End Sub

Private Sub dsdmNameChanged(ByVal sender As Object, ByVal e As EventArgs) Handles dsdm.NameChanged
    Response.Write("alert('The name of the model has changed!!')")
End Sub
参照

DefaultSheetDataModel クラス
DefaultSheetDataModel メンバ

 

 


© MESCIUS inc. All rights reserved.