To display the different aggregates in separate cells that are aligned with the columns:

Generate the group header template with the number of cells and align it with the Grid columns. Leave out the first opening and the last closing <td> tags, because the template is rendered within a single <td></td> in the group header.