PowerTools SPREAD for Windows Forms 8.0J
ParentRowIndex プロパティ (IChildModelSupport)


親行のインデックスを取得または設定します。
構文
'Declaration
 
ReadOnly Property ParentRowIndex As Integer
'使用法
 
Dim instance As IChildModelSupport
Dim value As Integer
 
value = instance.ParentRowIndex
int ParentRowIndex {get;}

プロパティ値

親行の行インデックスを表す Integer
次のサンプルコードは、親行のインデックスを返します。
private void fpSpread1_ChildViewCreated(object sender, FarPoint.Win.Spread.ChildViewCreatedEventArgs e)
{
     FarPoint.Win.Spread.Model.IChildModelSupport mTest;
     mTest = (FarPoint.Win.Spread.Model.IChildModelSupport)e.SheetView.Models.Data;
     label1.Text = "The parent model is " + Convert.ToString(mTest.Parent);
     listBox1.Items.AddRange(new Object[] {mTest.ParentRelationName, mTest.ParentRowIndex.ToString()});
}
Private Sub FpSpread1_ChildViewCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChildViewCreatedEventArgs) Handles
FpSpread1.ChildViewCreated
     Dim mTest As FarPoint.Win.Spread.Model.IChildModelSupport
     mTest = e.SheetView.Models.Data
     Label1.Text = "The parent model is " & Convert.ToString(mTest.Parent)
     ListBox1.Items.AddRange(New Object() {mTest.ParentRelationName, mTest.ParentRowIndex.ToString()})
End Sub
参照

IChildModelSupport インタフェース
IChildModelSupport メンバ

 

 


© 2004-2015, GrapeCity inc. All rights reserved.