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


Glossary Item Box

Gets or sets the parent data source.

Syntax

Visual Basic (Declaration) 
Property Parent As IChildModelSupport
Visual Basic (Usage)Copy Code
Dim instance As IChildModelSupport
Dim value As IChildModelSupport
 
instance.Parent = value
 
value = instance.Parent
C# 
IChildModelSupport Parent {get; set;}

Property Value

IChildModelSupport object with parent data model

Example

This example returns the parent IDataSourceSupport object.
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);
}
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)
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.