Endeca Presentation API
GroupBy Constructor (groupingKey, depth)
NamespacesEndeca.Navigation.AnalyticsGroupByGroupByGroupByNew(String, Int32)
Constructs a new GroupBy, which will request aggregation of records into groups based on the Endeca property or dimension named groupingKey.
Declaration Syntax
C#Visual BasicVisual C++
public GroupBy(
	string groupingKey,
	int depth
)
Public Sub New ( _
	groupingKey As String, _
	depth As Integer _
)
public:
GroupBy (
	String^ groupingKey, 
	int depth
)
Parameters
groupingKey (String)
The name of the Endeca property or dimension by which the records will be aggregated.
depth (Int32)
The level of a dimension hierarchy at which the grouping will be performed.
Remarks
This two-parameter constructor will request aggregation of records into groups based on the Endeca property or dimension named groupingKey. For dimensions, the grouping will depend on the value's ancestor at depth from the root of the dimension's hierarchy.

Note that a depth of zero does not indicate grouping at the root of the hierarchy, but rather it denotes that depth will not be taken into account at all, so grouping will be performed based on the values encountered.

Examples
If a dimension named Region contains a hierarchy of Country, State, and City, and the grouping was desired at the State level (one level below the root of the dimension hierarchy), the constructor code would be:
CopyC#
GroupByList g = new GroupByList();
GroupBy grByReg = new GroupBy("Region",1);
g.add(grByReg);

Assembly: Endeca.Navigation (Module: Endeca.Navigation) Version: 0.0.0.0