Demos
Documentation
API
More Samples
Download Wijmo

International Sort

The CollectionView class uses the Intl.Collator class to compare strings for sorting. This class handles lower/upper case as well as diacritics (accents) often present in international applications.

By default, the CollectionView class uses the default Intl.Collator for comparing strings, and JavaScript to compare all other objects. You can override this by setting the CollectionView's sortComparer property to a function that compares two values using whatever logic you want.

For example, here's how the CollectionView and JavaScript sort a list of strings with diacritics, numbers, and upper/lower case strings: