0

How to combine two columns in just one dataField?

 <dxi-column
    dataField="[Year, Make, Model]"
    caption="Vehicle"
    width="auto"
    [minWidth]="100"
  ></dxi-column>

I want to combine the Year, Make, and Model field in just one column, resulting their values will just separated by a space when displayed on a table.

krlshnx
  • 51
  • 1
  • 9

1 Answers1

3

I solved it using [cellTemplate]

<dxi-column
    cellTemplate="vehicleTemplate"
    caption="Vehicle"
    width="auto"
    [minWidth]="100"
></dxi-column>

<div *dxTemplate="let item of 'vehicleTemplate'">
    <p class="">{{ item.data.Year }} {{ item.data.Make }} {{ item.data.Model }}</p>
</div>
krlshnx
  • 51
  • 1
  • 9