bootstrap datatable error sorting column currency
bootstrap datatable error sorting column currency
rafacsh
Posts: 1Questions: 1Answers: 0
Good afternoon, I'm having trouble sorting columns with coin type, datatable sorting is incorrect, other types are correct.
I am already using a version higher than 1.10
This discussion has been closed.
Answers
Not sure if Datatables is expected to automatically sort that format (1.000,00) as a number. There may be a better approach but I would use a
columns.render
to change the data for typesort
to remove the.
and replace the,
with.
. Maybe something like this example:http://live.datatables.net/goficemi/1/edit
Kevin
It can sort numeric data using a comma as the decimal character, but you need to tell it that this is the case. Full details are available in the manual. There is also an example available here.
Allan