This question has been answered through email support:
There is no easy and clean way to get it. Here is the only way the developer found:
DataGridContext context = DataGridControl.GetDataGridContext( groupHeaderControl );
// Get the GroupHeaderFooterItem of the actual GroupHeaderControl
GroupHeaderFooterItem header = ( GroupHeaderFooterItem )context.GetItemFromContainer( groupHeaderControl );
// Get the parent CollectionViewGroup from the current Group.ParentGroups' first item
CollectionViewGroup parentCollectionViewGroup = context.GetParentGroupFromItem( groupHeaderControl.Group.ParentGroups[ 0 ].GetItems()[ 0 ] );
// Create a GroupHeaderFooterItem from this CollectionViewGroup using the Template of the current GroupHeaderFooterItem's Template
GroupHeaderFooterItem parentGroupHeaderFooterItem = new GroupHeaderFooterItem( parentCollectionViewGroup, header.Template );
//Get the container for this item which will be an inner type inheriting ContentPresenter
ContentPresenter groupHeaderFooterItem = context.GetContainerFromItem( parentGroupHeaderFooterItem ) as ContentPresenter;
//Get the first Child of this ContentPresenter which will be the GroupHeaderControl of the parent level using VisualTreeHelper since it is created via a DataTemplate
GroupHeaderControl parentGroupHeaderControl = VisualTreeHelper.GetChild( groupHeaderFooterItem, 0 ) as GroupHeaderControl;
* We recommend that you add the many checks against null and index out of range that are missing from this code snippet, to avoid possible errors.
** Quick Tip: Clients with an active support subscription should be sending their questions by email if they wish to benefit from the faster response time. Thanks!
Diane Lafontaine
Technical Support
Xceed Software Inc.