I’l explain it here since it is more readable.
The unlimited config string needs to be on it’s own object. It has nothing to do with the stuff you are showing in the grid. You could have a helper object that is associated with the account of the user (so that every user has it’s own settings).
On your page, you need a dataview that has your helper object. Inside of this dataview, you can now have your datagrid 2. The easiest way (without any custom logic) is to set it up like this:
ConfigString is the attribute I am using on my helper object that is shown in the dataview in which the datagrid2 is placed. OnChange I want to save the changes without closing the page. This ensures, that every change myde by the user will directly be stored in the config object.
You can also apply custom logic when calling amicroflow, but this example covers the basic functionality.
Please download “Data widget”’s most recent version, 2.0.2, wrap your datagrid in a dataview, and see this for the description: https://docs.mendix.com/appstore/modules/data-grid-2.
Just now I have used this for the first time, and it works, but has it drawbacks:
To get it implemented correctly, I added an entity that I associated to ‘Person’ (see module ‘Person’ in the marketplace, Systemuser):
Now I can wrap my datagrid2 in a dataview that, for its datasource, retrieves the object by elementname.
MarketModule Person released today has this setup as well. If you don’t have or want that module, connect PersonalSettings to System.UserAccount
Did you place your DataGrid2 inside of a dataview that has the config object?
If not, you need to do that. This vonfig object needs an attribute (unlimited string) in which DG2 is storing the configuration. You can have one config object per app, one per user or even multiple ones per user. This logic need to be created by you, for example in datasource microflows.