If the attirbute is an enumeration there is a widget for that: https://appstore.home.mendix.com/link/app/2641/First-Consulting/EnumClass
Regards,
Ronald
I don't think you should use a data grid for this. If you use a template grid instead you can insert tables on which you can apply conditional visibility. You should insert some table cells, right-click the cel/row and select 'Edit condition for this row...' in order to accomplish this.