Sorting not working when using templates
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
- Current behavior I am using templates as my data is not flat and I am formatting the data a bit differently in each. So I am calling functions on the data from the template. Clicking on the table headings gives a random order
- Expected behavior I expected the table to be sorted
- Reproduction of the problem I made a plunkr here: http://plnkr.co/edit/abYiAm08Ibff9SixKoyG?p=preview
- Table version: 0.9.3 (most recent)
Please try the plunkr to see the problem in action. Click the table headings and see what is happening. If I preprocess the data I might be able to get around this but doing the datepipe in the component seems to slow down the table massively. So this was the nicest way I found and I am happy with it except for the sorting.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Gridview sorting not working with Item template - Stack Overflow
You have to use ToTable dataTable.DefaultView.Sort = e.SortExpression + " " + SortDir; gvwSacBus_Docs.DataSource = dataTable.DefaultView.
Read more >Template Field GridView Sorting is not working - MSDN
I am trying to sort the gridview data using template field column. But it is not working. The Mark up code is like...
Read more >datagrid sorting is not working ,when ng-template is used to ...
Hi. Datagrid is not allowing sorting,When ng-template is used to display columns data,My app code is. as below.
Read more >Kendo Grid with Column Templates not sorting correctly - Telerik
The only way for sorting to work is to point the field at the value property - field: "attributes['contact.firstname'].value" - but then I...
Read more >Help:Sorting - Wikipedia
It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus and vetting. Shortcuts · WP:SORT · WP:TABLESORT ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried to use the same data set you have there and I cannot sort even when not using templates. When I used flat data, it sorted it no problem. I think nested data isn’t sort-able right now 😦
The event is exposed now so you can trigger the sort.