You can use this Dynamic (Tree) Table widget in the form of a grid as per your scenario. It supports dynamic columns which you may retrieve from a microflow. See this test project to get an idea of the widget
A widget that can probably help you out
https://marketplace.mendix.com/link/component/216495
Data Grid with variable columns. No more list view in list views!
Features