WIJMO filter: how to undo or 'clear' a sort?

Posted by: kyle.m.vassella on 30 November 2018, 1:03 pm EST

    • Post Options:
    • Link

    Posted 30 November 2018, 1:03 pm EST

    Hi all,

    I’m using WIJMO 5 FlexGrid on an Angular 6 app.

    I’ve applied a WIJMO filter onto my FlexGrid. I see that if I apply a filter, I can clear it by clicking the ‘clear’ button.

    But what if, instead of filtering, I click the column header to just do a ‘sort’ (which makes the little arrow appear and sorts by abc order). Once I do this, I’m unable to leave the sorted view. Either I can sort by alphabetical or reverse alphabetical order - but I can’t get the grid to return to its original order that it had on initial loading of the data.

    Aside from disabling sorting altogether, how can I ‘clear’ a column header sort?

  • Posted 3 December 2018, 1:34 am EST

    Hi,

    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 collection.

    Please refer to the following code snippet and sample:

    grid.collectionView.sortDescriptions.clear()
    

    https://stackblitz.com/edit/angular-fkyvsn?file=src%2Fapp%2Fapp.component.html

    ~Sharad

Need extra support?

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

Learn More

Forum Channels