Spread for ASP.NET 7.0 Product Documentation
Parent Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > Group Class : Parent Property


Glossary Item Box

Gets the parent of the group.

Syntax

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

Property Value

Group object containing the parent group

Example

This example returns the parent.
C#Copy Code
FarPoint.Web.Spread.Model.GroupDataModel gm = new FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.ActiveSheetView.DataModel);
FarPoint.Web.Spread.SortInfo[] sort = new FarPoint.Web.Spread.SortInfo[1];
sort[0] = new FarPoint.Web.Spread.SortInfo(0, true);
gm.Group(sort, System.Collections.Comparer.Default);
FpSpread1.ActiveSheetView.DataModel = gm;

FarPoint.Web.Spread.Model.Group dg = new FarPoint.Web.Spread.Model.Group(gm, (FarPoint.Web.Spread.Model.Group)gm.Groups[0], 0, true);
FarPoint.Web.Spread.Model.Group g = dg.Parent;
String msg = g.ToString();
Response.Write("alert('" + msg + "')");
Visual BasicCopy Code
Dim gm As New FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.ActiveSheetView.DataModel)
Dim sort(0) As FarPoint.Web.Spread.SortInfo
sort(0) = New FarPoint.Web.Spread.SortInfo(0, True)
gm.Group(sort)
FpSpread1.ActiveSheetView.DataModel = gm

Dim dg As New FarPoint.Web.Spread.Model.Group(gm, gm.Groups(0), 0, True)
Dim g As FarPoint.Web.Spread.Model.Group = dg.Parent
Dim msg As String = g.ToString()
Response.Write("alert('" & msg & "')")

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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