Spread ASP.NET 6.0 Product Documentation
Group Constructor(GroupDataModel,Group,Int32,Boolean)
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > Group Class > Group Constructor : Group Constructor(GroupDataModel,Group,Int32,Boolean)


target
Group data model target
parent
Group parent
column
Column index
ascending
Whether items are shown ascending

Glossary Item Box

Creates a new group of rows with the specified display settings.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal target As GroupDataModel, _
   ByVal parent As Group, _
   ByVal column As Integer, _
   ByVal ascending As Boolean _
)
Visual Basic (Usage)Copy Code
Dim target As GroupDataModel
Dim parent As Group
Dim column As Integer
Dim ascending As Boolean
 
Dim instance As New Group(target, parent, column, ascending)
C# 
public Group( 
   GroupDataModel target,
   Group parent,
   int column,
   bool ascending
)

Parameters

target
Group data model target
parent
Group parent
column
Column index
ascending
Whether items are shown ascending

Example

This example returns whether the group is ascending.
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);
bool b = dg.Ascending;
String msg = b.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 b As Boolean = dg.Ascending
Dim msg As String = b.ToString()
Response.Write("alert('" & msg & "')")

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.