I am currently using Primeng2 datatable and I am looking to adjust the column width to match the header size.
This is my HTML code:
<p-dataTable #dtselfcollectmonthly [exportFilename]="exportname" [rows]="10" [value]="rawdatatrucks">
<ng-container *ngFor="let col of colheaders">
<p-column [field]="col.field" [header]="col.header" [style]="{'width':'100%'}" //setting width to 100% fails></p-column>
</ng-container>
</p-dataTable>
Even after setting the width to 100%, it doesn't match the header size. Any suggestions on what else I need to add?