Initializes a new instance of DataManagerGroup.
Parameters:
Name | Type | Description |
---|---|---|
dataManager |
DataManager |
The DataManager that owns this DataManagerGroup. |
groupDescriptor |
Array | Object |
The group descriptor that generates this DataManagerGroup. |
calcGroup |
Object |
The CalcGroup that generates this DataManagerGroup. |
parentGroup |
Object |
The parent group of this DataManagerGroup. |
Properties:
Name | Type | Argument | Description |
---|---|---|---|
name |
string | The name of this group. |
|
collapsed |
boolean | The collapse status of this group. |
|
parent |
DataManagerGroup |
<nullable> |
The parent group. |
level |
Number | The level of this group. |
|
isBottomLevel |
boolean | The flag that indicates whether this group is a bottom group. |
|
itemCount |
Number | The number of items in this group. |
|
expandedItemCount |
Number | The number of expanded items in this group. |
|
groups |
Array |
<nullable> |
An array of DataManagerGroup that contains the group's subgroups. |
groupDescriptor |
GC.Spread.Views.DataView.DataManager.groupDescriptor | The group descriptor which generates this group. |
|
nodes |
Array |
<nullable> |
An array of DataManagerNode that contains all the tree nodes in this group. |
rootNode |
DataManagerNode |
<nullable> |
The dummy root tree node of this group. |
isHierarchical |
boolean | Indicates whether this group is a hierarchical group that contains tree nodes. |
|
path |
Array | An array of indexes that indicate the path from the root group to the current group. |
Methods
evaluate(formula){*}
Evaluates the formula with the current group context.
Parameters:
Name | Type | Description |
---|---|---|
formula |
string |
The string formula to be evaluated. |
Returns: {*} The evaluated result.
findChildGroupByPath(path){DataManagerGroup}
Gets the child group from the relative path of this group.
Parameters:
Name | Type | Description |
---|---|---|
path |
Array |
A array of number which indicate relative path of the child group. |
Returns: {DataManagerGroup} The child group.
getCalculatedColumnValues(name){Array}
Gets all values in this group of a specified calculated column.
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
The name of the calculated column. |
Returns: {Array} Return array of column values.
getItem(itemIndex, getAllInGroup, getAllInTree){*}
Gets the data item in this group at a specified relative index.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
itemIndex |
Number |
Relative index for item in this group. |
|
getAllInGroup |
boolean | false |
optional
If false, the item in the collapsed group is not counted. |
getAllInTree |
boolean | false |
optional
If false, the item in the collapsed tree node is not counted. |
Returns: {*} The data item at the specified index.
getItems()
Gets all items in this group.
Returns: {undefined} Return array of data items.
getSourceRowIndex(itemIndex){index}
Maps the relative view index to the index in the data source.
Parameters:
Name | Type | Description |
---|---|---|
itemIndex |
Number |
Relative index in this group. |