sorting formatted numbers with dot like 100.000.000
sorting formatted numbers with dot like 100.000.000
I am facing a Problem with sorting/ordering a special type of formatted numbers.
I have numbers like 111.111.111 or 46.323.345,88 which are amounts of money.
I tried to use type: num-fmt but had no success. When i add this type attribute in my project i cant even sort anymore. Nothing happend like i hvae ordering disabled.
private initVolumenTable() {
$('#volumen-table').DataTable({
columnDefs: [
{targets:3, type: 'num-fmt' }
],
"scrollY": "400px",
"scrollCollapse": false,
"paging": false,
"ordering": true,
});
In JSFiddle the ordering still happens(respond), but its incorrect..
https://jsfiddle.net/kn4s3ezg/2/
Hope u guys can help me
This question has an accepted answers - jump to answer
Answers
A custom sorter would remove the dots and replace the comma with a dot