You can't do this with basic Mendix datagrid functionality. If you want something like this i would suggest looking at a different way of styling this.
Depending on your case you could use lay-out grids with fixed headers like for example:
Or use nested dataviews or listviews.