Spread Windows Forms 7.0 Product Documentation
ParentRowIndex Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > IChildModelSupport Interface : ParentRowIndex Property


Glossary Item Box

Gets or sets the index of the parent row.

Syntax

Visual Basic (Declaration) 
ReadOnly Property ParentRowIndex As Integer
Visual Basic (Usage)Copy Code
Dim instance As IChildModelSupport
Dim value As Integer
 
value = instance.ParentRowIndex
C# 
int ParentRowIndex {get;}

Property Value

Integer row index of the parent row

Example

This example returns the index of the parent row.
C#Copy Code
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()});
}
Visual BasicCopy Code
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

Requirements

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

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.