Sorting not getting cleared in Wijmo Grid

Posted by: on 10 June 2021, 5:11 pm EST

  • Posted 10 June 2021, 5:11 pm EST


    I've implemented sorting in my grid but after sorting there is no way to clear it.
    How can i clear the sorting.
    example -
    Initial Sequence - [c, a ,b]
    After ascending - [a, b, c]
    After descending - [c, b, a]

    After clicking on the clear button of the sorting/filtering popup it doesn't take me to the initial sequence.

    Snippet -

    Please help me with this issue.

    Thank You.
  • Replied 13 June 2021, 2:59 pm EST

    Hi ,

    Can you please help us with the solution.

    Thank you.
  • Marked as Answer

    Replied 13 June 2021, 11:38 pm EST

    Hi Srishti,

    The clear button in FlexGridFilter only clears the filter applied on the Grid. You may clear a sort applied on a column by ctrl+click on the column header.
    if you would like to clear sort programmatically, then you may call clear() method on gridInstance.collectionView.sortDescriptions as follows:
     <button (click)="flex.collectionView.sortDescriptions.clear()">Clear Sort</button>

    For better understanding, you may refer to the below code sample -

  • Replied 15 June 2021, 3:02 pm EST

    Hi Ashwin,

    Thank you for the solution.
    It works.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels