Hello, I am having issues with my table not sorting numbers correctly. I have a column that needs to be sortable by amount, for instance: 10.8, 10, 9.3, etc... and it will not sort them correctly. Instead it it sorting them: 10, 10.8, 9.3
It is sorting in Is there a setting that I am missing?
Here is how the table is sorting them...in the screenshot...
You saved this column as a string, not as a float, and that's why you're facing this issue.
Sorting for string columns is done alphabetically, not numerrically. You would need to either delete this table and create a new float-type column, or convert this column to a float, but most likely you will need to modify the data in that column afterwards.
Strings allow you to enter literally anything in the cell, but that renders the sorting useless in this case.
You can modify the format in wpDataTables settings, so if you see 15.000,00 (with the point being the thousand, and the comma being the decimal separator), you can change it to 15,000.00. Then, as mentioned in my previous response - you will most likely need to modify the data in that column afterwards since converting the data from string to float is not expected to work flawlessly.
Hello, I am having issues with my table not sorting numbers correctly. I have a column that needs to be sortable by amount, for instance: 10.8, 10, 9.3, etc... and it will not sort them correctly. Instead it it sorting them: 10, 10.8, 9.3
It is sorting in Is there a setting that I am missing?
Here is how the table is sorting them...in the screenshot...
Thanks for your help!
Hello Kristy
You saved this column as a string, not as a float, and that's why you're facing this issue.
Sorting for string columns is done alphabetically, not numerrically. You would need to either delete this table and create a new float-type column, or convert this column to a float, but most likely you will need to modify the data in that column afterwards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
That doesn't work... I'm attaching a screenshot. These numbers should be in the format of 9.3 or 10 or 3.4- not 93,000
When they are on String they show the number correctly, however they will not sort correctly.
Hi again Kristy
Strings allow you to enter literally anything in the cell, but that renders the sorting useless in this case.
You can modify the format in wpDataTables settings, so if you see 15.000,00 (with the point being the thousand, and the comma being the decimal separator), you can change it to 15,000.00. Then, as mentioned in my previous response - you will most likely need to modify the data in that column afterwards since converting the data from string to float is not expected to work flawlessly.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables