Forums

WP-Table Reloaded sorting doesn't work properly in IE (6 posts)

  1. henkboersema
    Member
    Posted 7 months ago #

    I'm using IE8 and Google chrome. The tables I create sort ok in Chrome but not in IE8. http://www.ziektekosten-vergelijken.nl/aanvullende-verzekering/tandarts/

    Can somebody help?

  2. TobiasBg
    Member
    Posted 7 months ago #

    Hi,

    can you explain where this does not sort correctly?

    Very likely though, you will need to ask your question in the support forums at http://www.datatables.net as this seems to be a problem in the DataTables JavaScript library.

    Best wishes,
    Tobias

  3. henkboersema
    Member
    Posted 7 months ago #

    Thank you for your reply,

    if you press on "premies" in IE and then again in Chome you will notice the difference. In Chrome it sorts from high to low and backwards. In IE it gets messed up.

    I will drop this question in the forum at datatables as well. It would be weird if I'm the only one with this issue.

  4. TobiasBg
    Member
    Posted 7 months ago #

    Hi,

    thanks for the example.

    I still don't know why it happens, but I assume that it has to do with the currencies.
    By default, DataTables doesn't actually know how to sort these, but sorts them as strings. So, it is definitely interesting to see that Chrome still gets them correct.

    Regards,
    Tobias

  5. henkboersema
    Member
    Posted 7 months ago #

    Youre right, it sorts the currencies from 1-9. Do you have some insight on how to make sure it sorts from, for instance, $3,- to $19,99. Right now it thinks 19,99 is lower than 3 because of the 1 in 19

  6. TobiasBg
    Member
    Posted 7 months ago #

    Hi,

    for something like that, you will certainly need a plugin/extension for the DataTables library that implements a custom sorting for currency values in the format that you are using. There is something similar available in this plugin: http://tobias.baethge.com/download/plugins/additional/wp-table-reloaded-currency-sorting.zip
    This is a plugin that will enable a better currency sorting, but it might not work out of the box for your values.

    Regards,
    Tobias

Reply

You must log in to post.

About this Topic