title: Dynamic rowspan column in primeng p-table
body: <p>I want dynamic rowspan column in primeng p-table
  <a href="https://primefaces.org/primeng/#/table/colgroup" rel="nofollow noreferrer">https://primefaces.org/primeng/#/table/colgroup</a></p>
  
  <p>I have tried this:</p>
  
  <pre><code> &lt;ng-template pTemplate="header" let-columns&gt;
                  &lt;tr class="text-center"&gt;
                    &lt;th *ngFor="let col of businessLogicMasterObject.columnList" [colSpan]="col.colSpan" [rowSpan]="col.rowSpan"&gt;
                      &lt;div class="break-string-length"&gt;
                        {{col?.header}}
                      &lt;/div&gt;
                    &lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;tr class="text-center"&gt;
                    &lt;ng-template ngFor let-col [ngForOf]="businessLogicMasterObject.columnList"&gt;
                      &lt;th *ngFor="let subheader of col?.subheaders" [colSpan]="subheader.colSpan" [rowSpan]="subheader.rowSpan"&gt;
                        {{subheader?.header}}
                      &lt;/th&gt;
                    &lt;/ng-template&gt;
                  &lt;/tr&gt;
  &lt;/ng-template&gt;
  </code></pre>
  
  <p>But this allow me only 2 level of rowspan:</p>
  
  <p><a href="https://i.stack.imgur.com/Zw0lZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zw0lZ.png" alt="enter image description here"></a></p>
  
  <p>How can I have another level of header?  </p>
  
  <p>Means As an image shows the header - Stock, subheader - SA, MA, A, U.<br>
  So the SA has also subheaders</p>