Hi Arslan,
Are you sure you need a microflow a datasouce? Based on the above, you could also use standard xpath datasource, which would allow you to add search fields (including Categories) which would allow you to filter on this.
If not, you can create Custom search functionality (multiple examples on the forum, like https://forum.mendix.com/link/questions/91630) that allow you to use filtering in your datasource microflow.
Let me know if this answers your question!
Instead of a datagrid you can use a list view and the list view controls. More specifically you can use the Checkbox filter to achieve what you want.
Check here for more details - https://appstore.home.mendix.com/link/app/105694/