Spread Windows Forms 6.0 Product Documentation
ParentRelationName Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetDataModel Class : ParentRelationName Property


Glossary Item Box

Gets the name of the data relation being used for a hierarchical display of data.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property ParentRelationName As String
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim value As String
 
value = instance.ParentRelationName
C# 
public string ParentRelationName {get;}

Property Value

String containing the name of the parent

Example

This example returns the parent relation for the data model.
C#Copy Code
private void fpSpread1ChildViewCreated(object sender, FarPoint.Win.Spread.ChildViewCreatedEventArgs e) 
{
    FarPoint.Win.Spread.Model.DefaultSheetDataModel dm;
    dm = e.SheetView.Models.Data;
    string s;
    s = dm.ParentRelationName;
    MessageBox.Show("The name of the parent relation is " + s);
}
Visual BasicCopy Code
Private Sub FpSpread1ChildViewCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChildViewCreatedEventArgs) Handles
fpSpread1.ChildViewCreated
    Dim dm As FarPoint.Win.Spread.Model.DefaultSheetDataModel
    dm = e.SheetView.Models.Data
    Dim s As String
    s = dm.ParentRelationName
    MessageBox.Show("The name of the parent relation is " & s)
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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