Skip to main content

TcxDataControllerGroups.ChildDataGroupIndex Property

Returns the index of a specific child data group.

Declaration

property ChildDataGroupIndex[ParentDataGroupIndex: TcxDataGroupIndex; ChildIndex: Integer]: TcxDataGroupIndex read;

Property Value

Type
TcxDataGroupIndex

Remarks

This property returns the index of the specific child data group belonging to the parent data group addressed by the ParentDataGroupIndex parameter. The number of children of the parent data group is defined via its ChildCount property. The ChildIndex parameter can vary from 0 to (ChildCount - 1). To return a child data group at level 0 you need to pass value -1 for the ParentDataGroupIndex parameter. The ChildDataGroupIndex property returns -1 if it cannot locate a child for the parent data group.

The ParentDataGroupIndex property returns the index of the parent data group.

Consider a grid control displayed in the following image:

Data Groups

For this sample grid:

ChildDataGroupIndex[-1, 1] returns 2 (the ‘EXCHANGE: NYSE’ row)

ChildDataGroupIndex[2, 0] returns 3 (the first child of the ‘EXCHANGE: NYSE’ row)

ChildDataGroupIndex[1, 1] returns -1 (there is only one child for the ‘RISK : MED’ row)

See Also