• Hello
    I have made a table with some high numbers in it, but it doesn’t sort the figures into the correct order. It puts £6.750.000 higher than £50.000.000, and £360.000 above £17.500.000 Can you help please?
    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    this happens because you actually did not put numbers into the table, but strings. which are sorted differently.
    You will need to tell the DataTables JavaScript library (which offers the sorting) specifically that you are having currency values in your cells, which however requires some programming (see http://www.datatables.net).

    The easiest way would be to simply remove the £ sign and the dots from your cells. You could e.g. put the £ in the table header row.
    Then the sorting will work as expected.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-Table Reloaded] Sorting Numbers’ is closed to new replies.