You could add a class to the table containing something in the lines of:
tr:not(:first-child) {
visibility: hidden;
}
You can use CSS to only show the header once and not every row, add a class to the header (CLASS-FOR-HEADER) in this example and then show it only on the first row:
.mx-templategrid .mx-templategrid-row .CLASS-FOR-HEADER {
display: none;
}
.mx-templategrid .mx-templategrid-row:first-child .CLASS-FOR-HEADER{
display: block;
}
The DataGridExtension widget in the app store is capable of placing buttons inline in a DataGrid as well.
You could also add the headers above the template grid, and use something like flexboxes to align it on top of the template grid,