Spread for ASP.NET 9.0 Product Documentation
Group Constructor(GroupDataModel,Group,String,Int32,Boolean)
Example 


Group data model target
Group parent
Text string to display
Column index
Whether items are shown in ascending order
Creates a new group of rows with the specified diplay settings and the specified text.
Syntax
'Declaration
 
Public Function New( _
   ByVal target As GroupDataModel, _
   ByVal parent As Group, _
   ByVal text As String, _
   ByVal column As Integer, _
   ByVal ascending As Boolean _
)
'Usage
 
Dim target As GroupDataModel
Dim parent As Group
Dim text As String
Dim column As Integer
Dim ascending As Boolean
 
Dim instance As New Group(target, parent, text, column, ascending)
public Group( 
   GroupDataModel target,
   Group parent,
   string text,
   int column,
   bool ascending
)

Parameters

target
Group data model target
parent
Group parent
text
Text string to display
column
Column index
ascending
Whether items are shown in ascending order
Example
This example returns the column.
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], "Harris" 0, true);
int i = dg.Column;
String msg = i.ToString();
Response.Write("alert('" + msg + "')");
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), "Harris", 0, True)
Dim i As Integer = dg.Column
Dim msg As String = i.ToString()
Response.Write("alert('" & msg & "')")
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

Group Class
Group Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.