Presentation changes to grouptable inside a screen fragment not saved automatically

I have a screen fragment that contains a grouptable.

When i create an instance of this fragment programmatically inside a vbox, any manual changes to the grouptable presentation is not saved automatically. For example when the user shows or hides columns, the new look is not stored.
What could be causing this ?

I am using the following code to create the fragment programmatically:

VisitsFragment fragment = fragments.create(this, VisitsFragment.class);
fragment.setPatient(patient);
vbContainer.add(fragment.getFragment());
fragment.getFragment().setHeight("100%");

Can anyone here help me with my question ?
Thanks in advance

Hello Robert!

Does table have an id attribute? Do you mean Presentation functionality or just visual settings of GroupTable?

Yes, the groupTable has an id attribute that I had set. This groupTable is in a screen fragment.
When I say ‘presentation’ I am speaking of the visual aspect of the groupTable.
In other words, whenever I drag, reorder or hide a column of the groupTable, those manual changes are not persisted (stored/saved) because if I navigate to another page then go back to the page that creates the fragment, the previous visual changes are gone and the table is back to the original layout

Another observation I am making.

In table “sec_user_setting” that stores the saved layouts of the components in a screen, I am not seeing where runtime/manual changes to the groupTable in my fragment are being saved in the 'Value" field

By default settings are saved when user closes the screen and components have settingsEnabled="true" attribute (the default value).
Settings are not saved if user does not change visual settings of component (expanded/collapsed etc), component does not have an id or settingsEnabled="false".

I tried table filled with entities in Fragment that added programmaticaly like in your example. However settings are saved correctly.

Could you share code of your screen and fragment? Or share a small demo project where problem is reproduced?