Currency sorting isn't working for me in DataTables 1.10.9

Currency sorting isn't working for me in DataTables 1.10.9

pangelinopangelino Posts: 9Questions: 3Answers: 0

Hello, I'm using version 1.10.9 of DataTables from the CDN. We have one column of data displaying US currency values formatted like this $6,300,000 for example. Clicking on this column header to sort the table does not work properly. The ordering seems completely random. The documentation suggests that ordering of currency data like this should be handled by default in DataTables version 1.10+. Do you have any ideas what I could be doing wrong?

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • pangelinopangelino Posts: 9Questions: 3Answers: 0

    I can try to put together a test case but it will take some time since our site requires a login and is not publicly accessible. I have generated the following DataTables debugging code: ozujaw. Please let me know if this helps to diagnose the issue.

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Yes it does - you are using server-side processing, so the ordering is done by your script at /Proxy/Post?apiPath=api/project. It sounds like the ordering isn't being correctly applied in whatever that script is going.

    The server-side processing manual page details the parameters sends to the server.

    Allan

  • pangelinopangelino Posts: 9Questions: 3Answers: 0

    Thanks for your help, Allan! I'm sure I can track it down now.

This discussion has been closed.