MESCIUS SPREAD for ASP.NET 10.0J
GetItem メソッド (GroupDataModel)

行インデックス
行インデックス
構文
'Declaration
 
Public Function GetItem( _
   ByVal row As Integer _
) As IEditableObject
public IEditableObject GetItem( 
   int row
)

パラメータ

row
行インデックス

戻り値の型

項目を含む IEditableObject
次のサンプル コードは、グループの項目を削除します。
protected void Button1_Click(object sender, EventArgs e)
{
    FarPoint.Web.Spread.Model.GroupDataModel gm;
        if ((FpSpread1.ActiveSheetView.DataModel) is FarPoint.Web.Spread.Model.GroupDataModel)
        {
        gm = (FarPoint.Web.Spread.Model.GroupDataModel)FpSpread1.ActiveSheetView.DataModel;
        if ((gm.TargetModel) is FarPoint.Web.Spread.Model.IRangeSupport)
        {
            FarPoint.Web.Spread.Model.IRangeSupport im = (FarPoint.Web.Spread.Model.IRangeSupport)gm.TargetModel;
            System.ComponentModel.IEditableObject o;
            o = gm.GetItem(1);
            if (o is System.Data.DataRowView)
            {
                System.Data.DataRowView dr;
                dr = (System.Data.DataRowView)o;
                dr.Delete();
            }
        }
    }
}
s
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim gm As FarPoint.Web.Spread.Model.GroupDataModel
    If TypeOf (FpSpread1.ActiveSheetView.DataModel) Is FarPoint.Web.Spread.Model.GroupDataModel Then
        gm = FpSpread1.ActiveSheetView.DataModel
        If TypeOf (gm.TargetModel) Is FarPoint.Web.Spread.Model.IRangeSupport Then
            Dim im As FarPoint.Web.Spread.Model.IRangeSupport = gm.TargetModel
            Dim o As System.ComponentModel.IEditableObject
            o = gm.GetItem(1)
            If TypeOf o Is System.Data.DataRowView Then
                Dim dr As System.Data.DataRowView
                dr = o
                dr.Delete()
            End If
        End If
    End If
End Sub
参照

GroupDataModel クラス
GroupDataModel メンバ

 

 


© MESCIUS inc. All rights reserved.