DhtmlxGrid How to select a value for sorting?
I have been playing around with filtering and sorting in dhtmlxGrid ( https://dhtmlx.com/docs/products/dhtmlxGrid/samples/08_filtering/01_pro_filter.html ) and my question is: can we sort the column with employee names by name without changing the way they are written?
For example:
We have:
-
Alex Calson
-
David Edmond
-
James Yarwood
And after sorting, we want to have the names in the following order:
-
James Yarwood
-
Alex Calson
-
David Edmond
Is it possible?
+3
source to share
1 answer
The best way to achieve the functionality you want is to create a custom sort function that will sort the column with only the second part of the value. You can find a tutorial here:
https://docs.dhtmlx.com/grid__sorting.html#customsortingfunction
and a simple working example:
+1
source to share