Under a group, there may be either records or sub-groups. So a group has two properties, group.Groups and group.Records. Only one of these collections is non-null. If the group.Records != null, then the group is showing records and you can iterate through group.Records. If the group.Records is null, then group.Groups should be not null, and you can iterate through that collection. The entries in group.Groups will be a Group object, and you can use their .Category property to see the grouped key.
Group g = this.gridGroupingControl1.Table.TopLevelGroup;
if(g.Records != null)
{
//g.Records is populated
}
else
{
//g.Groups is populated
}