Commas disappearing when using .row.add()

Commas disappearing when using .row.add()

dakuwandakuwan Posts: 1Questions: 1Answers: 0

I am adding new rows to a table when users change a select box on my page. I first empty the table by looping through all rows and using the table.row().remove().draw();. Then I loop and add in new rows using table.row.add(newRow).

Everything is working fine except when I add numbers back in new rows they no longer have a comma in them when needed. For example, the number 10,000 shows when i load the table but when I empty it and add new rows in it will be 10000 without the comma. How can I get my commas back?

I have language: { 'thousands': ',' } in my table declaration, hence the commas on the initial load.

I'd appreciate any help someone could provide as I am pretty stumped right now.

Thanks

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.