Custom sort strategy not applied for sortingExpressions
New DiscussionI have a column defined with a custom sort strategy. That is working fine when I manually sort the column. However I added sortingExpressions so that it would be sorted in first place by default. That isn’t using the custom sort strategy but instead just using the default sorting strategy. I tried adding the strategy to the object passed in for sortingExpressions but its still not calling it.
I have:
this.summaryGrid.sortingExpressions =
[{fieldName: ‘formattedModifiedDate’, dir: SortingDirection.Desc, strategy: this.gridHelperService.stringDateSortStrategy}];
and column definition
<igx-column field=”formattedModifiedDate” header=”Modified Date” width=”160″ [sortStrategy]=”gridHelperService.stringDateSortStrategy”></igx-column>
The sorting is applied to the column by using sortingExpressions just the order is wrong and by debug I can see it never calls to my stringDateSortStrategy. When I click the column header for sorting it works properly and my sort is called.
How can I use my custom sort strategy with the sortingExpressions?
Thanks
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
5 Created On
Oct 05, 2020 Last Post
5 years, 6 months ago