Skip to content

Custom Sorting strategy for igx grid #13457

Answered by ddaribo
Vighneshaa asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Vighneshaa,

The "Sorting through the API" section in the IgxGrid documentation outlines a few key aspects about providing a custom implementation of the ISortingStrategy interface.

As you can read there, "Any IgxColumnComponent or ISortingExpression can use a custom implementation of the ISortingStrategy as a substitute algorithm".

Here is a StackBlitz sample demonstrating a simple custom sort strategy applied on two columns of the IgxGrid (the initial sorting expression on the CategoryName column as well as the sortStrategy assigned to the ShipCountry column). For the purposes of the example, the sorting algorithm is altered to sort by the last symbol, in case the compared values …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zdrawku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #13456 on September 13, 2023 08:18.