Custom Sorting strategy for igx grid #13457
-
Where can I find the documentation for the custom Sorting strategy in igx? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @Vighneshaa, The "Sorting through the API" section in the IgxGrid documentation outlines a few key aspects about providing a custom implementation of the 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 |
Beta Was this translation helpful? Give feedback.
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 thesortStrategy
assigned to theShipCountry
column). For the purposes of the example, the sorting algorithm is altered to sort by the last symbol, in case the compared values …