Here is the code that defines this property in our library.
public GridGroupingControl GroupingControl
{
get
{
Control c = this.ActiveGridView;
while (c != null)
{
if (c is GridGroupingControl)
return (GridGroupingControl) c;
c = c.Parent;
}
return null;
}
}
As you see, it is a dynamically set property that will return return null when there is no ActiveGridView associated with the GridTableModel. (In general, the only TableModel with such an active grid view is the parent one, this.grid.TableModel).
So, if you need to look up the GroupingControl based on a child GridTableModel, you could use a Hashtable that you set up yourself. But you cannot rely on the tableModel.GroupingControl property.