You decided on generalizations and that is one way to model it. In that case, you should create an overarching (non-persistent) object that you can use for all 3 generalized materials, and you populate using a Data Source Microflow and expose the non-persistent entity to the grid2 widget.
You can also remodel the Domain Model to have 1 Entity Material with an Enumeration for the type (Digital, Printable, Book). The Entity is the superset of all the attributes of the current Objects.
While filling the data, you can use the Enumeration for Visibility conditions of the Text boxes so that you only have input files based on the type Enumeration. In that case, it is easier to handle them together, but it is still possible to treat them based on the Enumeration type. Also, the selection using XPath can use the Enumeration type.
So, two options.
Go Make It
I would opt for using the listview with Material as datasource entity. And create templates in the listview per specialization.
See documentation on templates: https://docs.mendix.com/refguide/list-view/#templates
I know a data grid is different to a data grid, though it can be modeled representing a grid.
Add a specialization template
Switch to Specialization template