The best way to achieve this is with a listview instead of a datagrid.
With a datagrid (aka table), you don't have much room for custom styling.
If you change to a list view, you can add custom filters on top of the listview.
Documentation on list view controls can you find here: https://docs.mendix.com/appstore/widgets/list-view-controls/
Those controle can be customized perfectly with SaSS/CSS to make a pixel perfect design.
Hopefully this helps,
Peter