You can refer the following widget =>
And add stylings using Java script or bootstrap for the respected rows in the data grid.
And do the configuration as per the provided documentation in the widget.
Seems to me that you could best use a listview to achieve this. You would have to alter some scss to create it, In the theme folder there is a listview.scss file. If you alter this all listviews will be styled according to this.
Also have a look at the list building blocks on: https://atlas.mendix.com/p/buildingblocks maybe this could help you as a start.