Dan,
This option is available in the data grid extension widget in the appstore.
https://appstore.home.mendix.com/link/app/877/Flock-of-Birds/Data-Grid-Extension-(Flex-Headers)
The Mx version is 5.7 or higher, so not sure this will work in your 6.1.0 version, but maybe give it a try.