Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 527.2k

Button Display

Jun 24 2024 7:15 AM

Hi

  In below code if variable Action - true then i want to display Action in Header &  Edit/Delete buttons in a row.

<table mat-table [dataSource]="arrGrid">
      <ng-container *ngFor="let header of arrHeader">
        <ng-container [matColumnDef]="header">
          <th mat-header-cell *matHeaderCellDef>{{ header }}</th>
          <td mat-cell *matCellDef="let element">{{ element[header] }}</td>
        </ng-container>
      </ng-container>

      <tr mat-header-row *matHeaderRowDef="arrHeader"></tr>
      <tr mat-row *matRowDef="let row; columns: arrHeader;"></tr>
    </table>

Thanks


Answers (1)