Posted 21 April 2020, 1:49 pm EST - Updated 3 October 2022, 4:36 pm EST
Wijmo Flexgrid - sort the column headers alphabetically
Posted by: sravya_tamma on 21 April 2020, 1:49 pm EST
-
-
Posted 22 April 2020, 1:39 am EST
Hi,
For this, simply call the sort method of the ColumnCollection class and provide a comparator function that will compare the columns according to their headers:
grid.columns.sort(function(a, b) { return a.header.localeCompare(b.header) });
https://stackblitz.com/edit/js-p7qgm2
Regards,
Ashwin