Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Grid sorting changed
posted

I used to sort my igx-grid like so:

        this.grid.sortingExpressions = [
            {fieldName: 'name', dir: SortingDirection.Asc, ignoreCase: true}
        ];

but after the last update I'm getting an error that I'm missing the strategy property.  It looks like it's a dictionary...what am I supposed to put here?

Parents
  • 6365
    Verified Answer
    Offline posted

    Hello Scott,

    Thank you for the code-snippet you have provided.

    After the update, in order to set the sortingExpressions, you will have to include a sorting strategy object for each sorting expression. If you are not using any custom sorting strategy, you can update your code as follows:

    this.grid.sortingExpressions = [
    {fieldName: 'name', dir: SortingDirection.Asc, ignoreCase: true, strategy: DefaultSortingStrategy.instance()}
    ];

    For more details on this change, you can refer to the General section of version 6.1.9 in the changelog.

    If you have any questions, please let me know.

Reply Children