0
正在使用primeng2数据表格,我想将列的宽度设置为标题大小。将表列的宽度设置为标题宽度的大小
所以在我的HTML我有:
<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>
如上由宽度设置为100%的塔的宽度不设置为报头大小。
我还需要添加什么?
你可以添加输出网格的图像吗? –
@Vega是,并将其标记为正确 –
您是否设置了数据表的宽度? – Vega