Datasnap.DBClient.TCustomClientDataSet.GetGroupState
| [–] Properties | |
|---|---|
| Type: function | |
| Visibility: public | |
| Source: Datasnap.DBClient.pas Datasnap.DBClient.hpp
| |
| Unit: Datasnap.DBClient | |
| Parent: TCustomClientDataSet | |
Delphi
function GetGroupState(Level: Integer): TGroupPosInds;
C++
Data::Db::TGroupPosInds __fastcall GetGroupState(int Level);
Description
Indicates where the current record sits within a specified group of records.
Call GetGroupState to determine where the current record falls in the group of records specified by the Level parameter.
Level identifies a group by its grouping level on the current index. Grouping level 1 is the set of records with the same value on the first field in the index. Grouping level 2 is the set of records with the same values on the first two fields in the index, and so on. If Level specifies a grouping level greater than the GroupingLevel property, GetGroupState raises an exception.
GetGroupState returns a set that indicates where the current record falls in the current grouping level. It has one of the following values:
| Value | Meaning |
|---|---|
|
[gbMiddle] |
The current record is neither the first nor the last in the group. |
|
[gbFirst] |
The current record is the first in the group, which contains at least two records. |
|
[gbLast] |
The current record is the last in the group, which contains at least two records. |
|
[gbFirst,gbLast] |
The current record is the only record in the group. |
Note: If AggregatesActive is False or the current index does not support grouping, GetGroupState returns an empty set.