Title: [Plugin: WP-Table Reloaded] Does not sort correctly negative values
Last modified: August 20, 2016

---

# [Plugin: WP-Table Reloaded] Does not sort correctly negative values

 *  Resolved [whoaloic](https://wordpress.org/support/users/whoaloic/)
 * (@whoaloic)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/)
 * Hello Tobias,
    I notice that the plugin does not sort correctly negative values.
   By example, I have 3 cells with “-1″,”-11″,”-3″ and when I sort the cells in 
   descending order, it gives me that sorting : “-3”, “-11”, “-1” and it should 
   be “-1”, “-3”, “-11”.
 * Same problem with negative and decimal values.
 * Please do you have a solution?
 * [http://wordpress.org/extend/plugins/wp-table-reloaded/](http://wordpress.org/extend/plugins/wp-table-reloaded/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416539)
 * Hi,
 * that’s probably happening because the sorting algorithm from the DataTables JavaScript
   library (which does the sorting), detects the cell contents as strings and not
   as plain numbers. And as strings are sorted differently, you get these results.
 * Can you post the URL to the page with your table? I can then try to find out 
   what’s causing this in your case.
 * Regards,
    Tobias
 *  Thread Starter [whoaloic](https://wordpress.org/support/users/whoaloic/)
 * (@whoaloic)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416546)
 * Hi,
    Therefore, is there a way to sort number ? [here’s the URL](http://www.ain-genetique-service.fr/offre-genetique/races-laitieres/montbeliarde/)!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416570)
 * Hi,
 * thanks for the link.
 * The reason in your case is that you are using commas (,) in your numbers. I know
   that this is the common character to use in France (and here in Germany, too),
   but unfortunately, the DataTables library is developed in Great Britain (see 
   [http://www.datatables.net](http://www.datatables.net)), where a period (.) is
   used as a decimal delimiter.
 * Therefore, I suggest that you replace all , with . in your cells. Another idea
   could be to install this plugin extension: [http://tobias.baethge.com/download/plugins/additional/wp-table-reloaded-commavalues.zip](http://tobias.baethge.com/download/plugins/additional/wp-table-reloaded-commavalues.zip)
 * Regards,
    Tobias
 *  Thread Starter [whoaloic](https://wordpress.org/support/users/whoaloic/)
 * (@whoaloic)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416669)
 * Thank you for you answer,
    OK for using a period instead of a comma.
 * Regarding the plugin extension (I install it as a usual plugin), it does not 
   change anything if I keep commas.
 * Regards
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416699)
 * Hi,
 * if using a period works for you, that’s great!
 * The plugin extension is rather old already, so it might not work anymore. I’ll
   have to take a deeper look once I find the time. And it might be that it actually
   had a different purpose (namely allowing commas a thousand separators), I don’t
   really remember at the moment…
 * Best wishes,
    Tobias
 *  Thread Starter [whoaloic](https://wordpress.org/support/users/whoaloic/)
 * (@whoaloic)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416786)
 * Thank you for taking time to answer Tobias,
    regards.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416788)
 * Hi,
 * no problem, you are very welcome!
 * Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: WP-Table Reloaded] Does not sort correctly negative values’ 
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-table-reloaded_f7dcd3.svg)
 * [WP-Table Reloaded](https://wordpress.org/plugins/wp-table-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-table-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-table-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-table-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-table-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-table-reloaded/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-does-not-sort-correctly-negative-values/#post-2416788)
 * Status: resolved