jQuery DataTable Number Format of ajax data soure
jQuery DataTable Number Format of ajax data soure
Shujaat
Posts: 3Questions: 1Answers: 0
I have Ajax data source which contains the numbers and strings, the numeric data not in thousand comma separated format. Is the any function or property of datatable that will convert number to thousand comma separated format before binding to datatable? there is "sType" but used for sorting and searching not for displaying data in specific format.
Any Help?
Thanks in advance
This discussion has been closed.
Answers
The default number formatter in Datatables displays values with comma separators
See formatNumber
Thanks for the reply, but nothing works for me, by default datatable doesn't show numeric values with thousand comma separation.
simple js is:
var dataSet = [ [10000, 10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000] ]; $(document).ready(function () { $('#demo').html('