Hi Yang,
There are several options to apply styling to a Datagrid. I would like to suggest to have a look at the AtlasUI documentation. By having a look at the already available classes here, you'll maybe find what you need without additional styling.
If you do need to apply custom styling, it would be helpful if you can be more explicit on what you try to achieve and what you tried so far. It is possible to apply styling to only the first, next, even, etc. row.
https://atlasdesignsystem.mendixcloud.com/p/datagrids
https://community.mendix.com/link/questions/110149
I hope these might help you.
https://docs.mendix.com/refguide/data-grid/
https://docs.mendix.com/appstore/modules/data-grid-2/
https://docs.mendix.com/refguide7/data-grid/