<kendo-grid
[kendoGridBinding]="reports"
[pageable]="false"
[sortable]="true"
>
<kendo-grid-column field="quarter" title="Quarter">
</kendo-grid-column>
<kendo-grid-column field="wages" title="Total Wages" [width]="120" format="{0:c}">
</kendo-grid-column>
<kendo-grid-column field="taxable" title="Taxable Wages" [width]="120" format="{0:c}">
</kendo-grid-column>
<!-- Employer column doesn't sort -->
<kendo-grid-column field="employer" title="Employer" [width]="100">
<ng-template kendoGridCellTemplate let-dataItem>
{{ dataItem.entity?.name}}
</ng-template>
</kendo-grid-column>
</kendo-grid>
The grid above sorts properly on 3 columns, but not on the Employer column. Is it because I'm using the name property of the dataItem instead of the dataItem itself? Is there a way to do this so it sorts properly?
Apologies for this question; there was just a problem in how we had set up the column. The employer property in our grid data is "entity", so this fixed it:
<kendo-grid-column field="entity.name" title="Employer" [width]="100"> </kendo-grid-column>