3

I've been playing with the filtering and sorting in dhtmlxGrid (https://dhtmlx.com/docs/products/dhtmlxGrid/samples/08_filtering/01_pro_filter.html) and I have a question: Can we sort the column with the employees' names by the last names without the changing the way they are written?

E.g.:

We have:

  1. Alex Calson

  2. David Edmond

  3. James Brightwood

And after sorting we want to have the names in this order:

  1. James Brightwood

  2. Alex Calson

  3. David Edmond

Is it possible?

  • You should add some code to your question so people know you've at least made an attempt and give people a better understanding of how you want to achieve this. – li x May 04 '17 at 15:03

1 Answers1

1

The best way for you to reach the required functionality is to create a custom sorting function that will sort the column only by the second part of the value. Here you can find a tutorial:

https://docs.dhtmlx.com/grid__sorting.html#customsortingfunction

and a simple working example:

http://snippet.dhtmlx.com/146a327f0

sematik
  • 504
  • 3
  • 3