Posted 4 March 2025, 4:51 am EST
Hello team,
Is it possible to customize the default sorting function of ascending/descending buttons in wijmo sort buttons in the filter editor?
Forums Home / Wijmo / General Discussion
Posted by: gnajarro on 4 March 2025, 4:51 am EST
Posted 4 March 2025, 4:51 am EST
Hello team,
Is it possible to customize the default sorting function of ascending/descending buttons in wijmo sort buttons in the filter editor?
Posted 5 March 2025, 7:08 am EST
Hi gnajarro,
Yes, it is possible to customize the default sorting function of ascending/descending buttons sort buttons in the filter editor. There are two properties available on the collection view that you can use to change the sorting behavior, i.e. sortComparer, sortConverter. To completely replace the default sorting function with a custom function you can use the ‘sortComparer’ property. You can refer to the API links for more information -
https://developer.mescius.com/wijmo/api/classes/wijmo.collectionview.html#sortconverter
https://developer.mescius.com/wijmo/api/classes/wijmo.collectionview.html#sortcomparer
Here’s a sample for your reference demonstrating the same - https://jscodemine.mescius.io/share/6GPeSOrYHEmov55A8CWx1A/
In case, you face any issues, please let us know.
Regards