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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this is that the content in the “Erfaring” column is not numeric, but strings (because of the the “åŒr” after each value. And as strings are sorted differently than numbers, you get this result.
    To fix this, you’ll either have to remove all ” åŒr” from that column, or (as you have already installed the DataTables Sorting Plugins Extension), add this to the “Custom Commands” textfield on the “Edit” screen of the table:

    "aoColumnDefs": [ { "sType": "formatted-num", "aTargets": [ 3 ] } ]

    (The 3 in the code indicates that this shall apply to the fourth column, as counting starts with 0.)
    To later also fix the sorting for the “Kontrakt” column, change that code to

    "aoColumnDefs": [ { "sType": "formatted-num", "aTargets": [ 3, 7 ] } ]

    Regards,
    Tobias

    Thread Starter MortenJensen

    (@mortenjensen)

    Hello Tobias,

    Thank you very much. It solved the “erfaring” part. I tried to include the 7th column, and inserted a few raw contract numbers just to test it out, but nothing happened.

    Is it because the dollar sign is the first symbol?

    Thank you!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sure, no problem! You are very welcome!

    For the “Kontrakt” column: You’ll need to add more values, otherwise you can’t see if the sorting works.

    Regards,
    Tobias

    Thread Starter MortenJensen

    (@mortenjensen)

    Oh okay, so I need to basically fill that entire column out for it to be sortable?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, that might be necessary for the external sorting script to work.

    Regards,
    Tobias

    Thread Starter MortenJensen

    (@mortenjensen)

    Okay, thank you very much Tobias!

    Have a good one.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sure, no problem! You are very welcome!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

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

The topic ‘Sorting issue (past 10)’ is closed to new replies.