Prevent long number from being displayed in Scientific Notation
Prevent long number from being displayed in Scientific Notation
love_salesforce
Posts: 2Questions: 0Answers: 0
I am using JQuery datatables.net to show data in my VF page.
But , a number e.g -> 778002405501 is showing like this -> 7.78002E+11
How to prevent this and show it properly? Any idea
But , a number e.g -> 778002405501 is showing like this -> 7.78002E+11
How to prevent this and show it properly? Any idea
This discussion has been closed.
Replies
[code]
for (i = 0; i < records.length; i++) {
for (j in records[i]) {
cellValue = records[i][j];
if (cellValue) {
if(!isNaN(cellValue)){
records[i][j] = Number(cellValue).toPrecision();
}
}
}
}
[/code]
Then pass records in datatable like this : "aaData": records