Column Group
Brand Sale Rate Sales Profits Last Year This Year Last Year This Year rowData.brand rowData.lastYearSale rowData.thisYearSale rowData.lastYearProfit rowData.thisYearProfit Totals $3,283,772 $2,126,925
<p-treeTable [value]="sales">
<ng-template pTemplate="header">
<tr>
<th rowspan="3">Brand</th>
<th colspan="4">Sale Rate</th>
</tr>
<tr>
<th colspan="2">Sales</th>
<th colspan="2">Profits</th>
</tr>
<tr>
<th>Last Year</th>
<th>This Year</th>
<th>Last Year</th>
<th>This Year</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<td>
<p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
{ { rowData.brand } }
</td>
<td>{ { rowData.lastYearSale } }</td>
<td>{ { rowData.thisYearSale } }</td>
<td>{ { rowData.lastYearProfit } }</td>
<td>{ { rowData.thisYearProfit } }</td>
</tr>
</ng-template>
<ng-template pTemplate="footer">
<tr>
<td colspan="3">Totals</td>
<td>$3,283,772</td>
<td>$2,126,925</td>
</tr>
</ng-template>
</p-treeTable>