WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Problem with sorting numbers

[Resolved] Problem with sorting numbers

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    @tobiasbg

    Hi,

    thanks for your post and sorry for the trouble!

    You are right, the reason for this are the commas.
    The JavaScript library that TablePress uses only knows the English number format by default, which uses dots .
    However, there’s a TablePress Extension at http://tablepress.org/extensions/datatables-sorting-plugins/ that you can install to change this. After activating that, just add

    "aoColumnDefs": [ { "sType": "numeric-comma", "aTargets": [ 5 ] } ]

    to the “Custom Commands” textfield on the “Edit” screen of the table.

    The other way would be to do a search/replace in Excel and replace the , with a ., if that number format would be ok for you.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Problem with sorting numbers’ is closed to new replies.