• Resolved Stig Ove Voll

    (@stig-ove-voll)


    In my first column I have items numbered from 1 to approx. 10000, but when I try to sort the column, it jumps from 87 to 870 to 8700.

    I’m not sure if the sorting plugin has anything to do with it, but this is how it looks like:

    “columnDefs”: [ { “orderable”: false, “targets”: [ 3,12,13 ] } , { “type”: “formatted-num”, “targets”: [ 1 ] }]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This indicates that the items are not pure numbers. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter Stig Ove Voll

    (@stig-ove-voll)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link!

    The problem in that first column are the “SOLGT” entries in two rows. These result in the column being sorted as text. Can you maybe replace those with numbers?

    Otherwise, please try this modified “Custom Command” part

    { "type": "formatted-num", "targets": [ 0 ] }
    

    (note that I changed the 1 to 0, to target the first column), but I’m not sure right now if this could work.

    Regards,
    Tobias

    Thread Starter Stig Ove Voll

    (@stig-ove-voll)

    Aha! Thank you. I went completely blind after working with 5000 rows the entire night ??

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sorting from 1 to 10000’ is closed to new replies.