Adds a new Group to the collection, along with header and footer sections for the new group.

Namespace:  C1.C1Report
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
public Group Add(
	string name,
	string groupBy,
	SortEnum sort
)
Visual Basic
Public Function Add ( _
	name As String, _
	groupBy As String, _
	sort As SortEnum _
) As Group

Parameters

name
Type: System..::..String
Contains the name of the new group.
groupBy
Type: System..::..String
Contains the value of the GroupBy property for the new group.
sort
Type: C1.C1Report..::..SortEnum
Contains the value of the Sort property for the new group.

Return Value

A reference to the newly added group.

Remarks

When a group is added to a report, the control automatically adds two new sections, the group header and group footer sections for the new group. These new sections are invisible by default.

Examples

The following code adds a new group:

Copy CodeVisual Basic
c1r.Groups.Add("NewGroup", "Left ([ProductName],1)", Ascending)
Copy CodeC#
c1r.Groups.Add("NewGroup", "Left ([ProductName],1)", Ascending);

See Also