GridEngine savedEngine = new GridEngine();
savedEngine.InitializeFrom(gridgroupingControl.Engine);
Then you could reset the relations in your control if the datasource is null.
If it is not null you can restore the engine settings with
gridgroupingControl.Engine.InitializeFrom(savedEngine);
The InitializeFrom logic can be used with any descriptors. The way you could also just save a TableDescriptor with nested relations and restore it back at a later time.
Stefan