I want dynamic rowspan column in primeng p-table https://primefaces.org/primeng/#/table/colgroup
I have tried this:
<ng-template pTemplate="header" let-columns>
<tr class="text-center">
<th *ngFor="let col of businessLogicMasterObject.columnList" [colSpan]="col.colSpan" [rowSpan]="col.rowSpan">
<div class="break-string-length">
{{col?.header}}
</div>
</th>
</tr>
<tr class="text-center">
<ng-template ngFor let-col [ngForOf]="businessLogicMasterObject.columnList">
<th *ngFor="let subheader of col?.subheaders" [colSpan]="subheader.colSpan" [rowSpan]="subheader.rowSpan">
{{subheader?.header}}
</th>
</ng-template>
</tr>
</ng-template>
But this allow me only 2 level of rowspan:
How can I have another level of header?
Means As an image shows the header - Stock, subheader - SA, MA, A, U.
So the SA has also subheaders