Hi Neha,
download the latest version of data widget module, it comes with sticky header datagrid2 .
No need to apply any custom styling for that.
Good luck!
Hi,
There is a community marketplace module that allows for sticky headers in datagrid2: https://marketplace.mendix.com/link/component/230152
Or check out this forum thread for other possible solutions: https://community.mendix.com/link/space/ui-&-front-end/questions/140255