Sorting problem

Sorting problem

EmyBEmyB Posts: 1Questions: 1Answers: 0

Hi,

I have a problem with your extension, let me explain:

I have a table that contains several columns, one of which has numbers, when I want to sort this column by ascending numbers, it does not work well,

I get this problem for the column "Capacité théorique/heure", sur mon site https://www.hopstockagromecanique.fr/

Can you help me? Do you have a code to use to replace this way of processing?

Thank you,

Answers

  • kthorngrenkthorngren Posts: 21,315Questions: 26Answers: 4,948

    You have numbers like 120 - 160 and 160 - 220 (1964) 200 - 240 (1967). How do you want to sort them? By default Datatables will see this column as strings and sort as strings. One option is to use orthogonal data to manipulate the data, for the sort process, to sort the way you want. Another is to create a sorting plugin. Or maybe an already created plugin will work or can be modified to fit your needs. Take a look at the any-number or natural sorting plugins.

    Kevin

Sign In or Register to comment.