See this for example in BaseApplication (https://marketplace.mendix.com/link/component/117760)
You will need to store the setting in an entity. I created this for it:
Next you need to store the DataGrid2 in an object 'PersonalSetting’ using a unique ElementName, in this example ‘UserAccountOverview’.
Having these properties:
The datasource microflow:
And calling microflow PersonalSetting_GetOrCreateForElement using this parameter:
And the microflow:
There is also an example in Marketplace module Person, https://marketplace.mendix.com/link/component/116181