Как добавить colspan с помощью freezecolumns - PullRequest
0 голосов
/ 03 июля 2019

1-й заголовок не заморожен появляется в замороженном столбце, т. Е. "3-я подача". Как получить пустой заголовок для замороженных столбцов
enter image description here

              <ng-template pTemplate="caption">
                <div class="ui-helper-clearfix">
                  <div class="p-grid">
                    <div class="p-col-8" style="padding-left: 35%;padding-top:12px;">Monthly Variance Analysis</div>
                    <div class="p-col-4">
                      <button type="button" pButton icon="fas fa-file-export" iconPos="right" label="Export"
                        (click)="ExportCountryVarianceClicked('VarianceGrid')"
                        style="margin-bottom: -6px;float:right;width:50%;font-size: small;"></button>
                    </div>
                  </div>
                </div>
              </ng-template>

              <ng-template pTemplate="colgroup" let-columns>
                <colgroup>
                  <col *ngFor="let col of columns" style="width:150px">
                </colgroup>
              </ng-template>

              <ng-template pTemplate="header" let-columns>
                <tr style="font-size: small;">
                  <th style="width:450px" colspan="3">3rd Submission</th>
                  <th style="width:450px" colspan="3">2nd Submission</th>
                  <th style="width:450px" colspan="3">1st Submission</th>
                </tr>
                <tr>
                  <th *ngFor="let col of columns">
                    {{col.header}}
                  </th>
                </tr>
              </ng-template>

              <ng-template pTemplate="body" let-forecastAcutal let-columns="columns">
                <tr style="font-size: small;">
                  <td *ngFor="let col of columns">
                    {{forecastAcutal[col.field]}}
                  </td>

                </tr>
              </ng-template>
</p-table>

Пожалуйста, не стесняйтесь корректировать формат кода. Я новичок в стеке переполнения

...