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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    There’s a slight misunderstanding here, I’m afraid: That Extension will “only” make it possible to sort columns that have numbers with a thousands comma in them (as they are then technically “strings” and not “numbers” anymore).
    It will however not add such a comma to numbers that don’t yet have one (but would be long enough). You would either have to add them manually or try using this as the “Custom Command” on the “Edit” screen of the table:

    "columnDefs": [ { "targets": [ 2, 3 ], "render": $.fn.dataTable.render.number( ',', '.', 0, '' ) } ]

    Regards,
    Tobias

    Thread Starter wjongkim

    (@wjongkim)

    Hi Tobias.

    Thank you for your reply. I solved the problem.
    your code is very helpful

    thank you.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘number format(thousands comma) not working’ is closed to new replies.