Grid not sorting correctly

0 Answers 53 Views
Grid Sortable
Jeremy
Top achievements
Rank 1
Jeremy asked on 29 Nov 2022, 05:27 AM

Hi, 

The grid does not seem to obey date sorting ever since I changed it to the template showed a formatted date string.

Would have thought the sorting would be on the field which is a valid Date type. 

 <kendo-grid-column width="160" field="queuedTime" title="Queued" [filterable]="false" filter="date">
        <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem.queuedTimeString }}</ng-template>
      

</kendo-grid-column>

Yanmario
Telerik team
commented on 01 Dec 2022, 01:39 PM

Hi Jeremy,

I am not sure what is the exact implementation on your side, but generally, templates are used to modify the displayed information as desired and shouldn't have an effect on the sorting. For example, using our kendoGridBinding directive:

https://stackblitz.com/edit/angular-ydfqnd?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fproducts.ts

https://www.telerik.com/kendo-angular-ui/components/grid/sorting/basics/

Could you provide me with a runnable example demonstrating the issue on your side, so that I can take a look and provide further details on this matter. Thank you in advance for your cooperation.

Regards,
Yanmario
Progress Telerik     

No answers yet. Maybe you can help?

Tags
Grid Sortable
Asked by
Jeremy
Top achievements
Rank 1
Share this question
or