I'm trying to pass extra fields to help with the processing. This how I define the columns array:
this.columns = [
{field: 'vin', header: 'Vin', isMultiRowColumn: true },
{field: 'year', header: 'Year', isMultiRowColumn: false},
{field: 'brand', header: 'Brand', isMultiRowColumn: false},
{field: 'color', header: 'Color', isMultiRowColumn: false}
];
Now, when I run the below code:
<p-dataTable [value]="testData">
<p-column *ngFor="let col of columns" [field]="col.field" [header]="col.header">
<ng-template let-col let-dt="rowData" pTemplate="body">
<span>{{dt[col.field] + '-' + col.isMultiRowColumn }}</span>
</ng-template>
</p-column>
</p-dataTable>
I'm getting this:
dsad231ff-undefined 2012-undefined VW-undefined Orange-undefined
Is there any reason isMultiRowColumn
is not being passed?
Thanks for helping