This is a migrated thread and some comments may be shown as answers.

Ordering and filtering columns based on the template value, not the datasource value

1 Answer 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fernando
Top achievements
Rank 1
Fernando asked on 07 Aug 2014, 10:55 AM
Hello, i need to have the grid columns filtering and ordering based on the template value (the text that is shown on the column´s cells) and not based on the dataSource value, and i dont know how to achieve this but i´m sure this can be done easily.
For example, if i have the datasource [{'prop':'A'},{'prop':'B'},{'prop':'C'}], and the template renders 2 for A, 1 for B and 3 for C.
Expected ordering would be: 3,2,1 if descending, or 1,2,3 if ascending, but is 2,1,3 for ascending (i guess it´s ordering by the values in the dataSource, not the values in the template) and 3,1,2 for descending.
Same for filtering, if i filter value=3 i don´t see any match, i do see a match if i filter value=B though.
Thanks a lot.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 11 Aug 2014, 08:33 AM
Hello Juan,

I am afraid that there is no such built-in functionality in the Kendo UI DataSource. What I would suggest you to do is using custom filtering and sorting of the dataSource that will match the project requirements. I would suggest you to check the following topic that discuss the custom sorting/filtering:

http://stackoverflow.com/questions/16571402/custom-sorting-in-kendoui-grid-datasource

http://www.telerik.com/forums/custom-filtering-7b617857877c

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Fernando
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or