How to format number in datatable and set deimal, thousands
How to format number in datatable and set deimal, thousands
tanvan
Posts: 2Questions: 2Answers: 0
Hi
I fill data in datatable, but i cannot how to set display number in column 2 (for ex). And i want set comma when display thoundsand number
please, help me
This discussion has been closed.
Answers
Using .render(), or .rowCallback(), or "formatNumber" and "language", or sending the data from the database in the desired format are all possible methods to display the data in the format you would like. I personally tend to send data exactly in the format that I want so I can control each cell individually in my code based upon it's content. So in my ajax pages, I will format the data as "25.00" instead of "25" or instead of "25.00000" before dataTables ever sees the data.