This app runs server side code to parse the JSON generated with the DataGrid table into the necessary format to display dynamic columns. There is also an equivalent client side action to perform the same JSON Parse. This asset is capable to parse this JSON:
Into this one, ready to be displayed as dynamic columns, according to how many different brands you have on your database:
Which will result in the following datagrid, where data from the database can be used as columns.
The current version of this component has been tested to work with OutSystems DataGrid as of October 2024.
As reported in this post, there was a problem in the logic for dynamic datatypes with boolean values. The asset and the demo were updated to fix this issue and the datagrid be able to display unchecked values.
In this new version we have added a new action for client and server side named ParseJson_ToDynamicColumnsDynamicDataType. This action takes the same inputs as the previous but one. Instead of receiving one value for the datatype of all dynamic columns, it receives a list with each dynamic column name and its correspondent data type, allowing for each dynamic columns on the datagrid to have its own datatype.