You can retrieve the group level by splitting the GroupIndex of the item in the following manner (like in this help article
int level = gridGroupFooterItem.GroupIndex.Split('_').Length;
The same could be used for the GridGroupHeaderItem.
Hope this helps.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items