Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxDataControllerGroups.ChildCount Property

Returns the number of children for a specified data group.

#Declaration

Delphi
property ChildCount[DataGroupIndex: TcxDataGroupIndex]: Integer read;

#Property Value

Type
Integer

#Remarks

The DataGroupIndex parameter specifies the index of a data group whose number of children is returned. The ChildCount property returns the number of child data groups. If a specified data group corresponds to the last grouping item it has no child data groups. In this case the ChildCount property returns the number of data rows in the group.

To return the number of data groups at level 0 you should pass value -1 for the DataGroupIndex parameter.

Use the ChildDataGroupIndex property to iterate the child data groups.

The following image demonstrates five data groups.

Data Groups

For this sample grid control:

ChildCount[-1] returns 2 (there are data groups 0 and 2 at level 0)

ChildCount[0] returns 1 (data group 0 owns only data group 1)

ChildCount[4] returns 3 (data group 4 owns three data rows)

See Also