Hello there, I have added a footer Total to a grid which outputs £606215.00, is there a method to add format as £606,215.00
<script>
function grid_onload()
{
var grid = $("#list1"),
sum = grid.jqGrid('getCol', 'Total', false, 'sum');
grid.jqGrid('footerData','set', {Total: '£ '+sum.toFixed(2)}, false);
}
</script>
Thanks
1 Answers
You will need to use some JS function to format it.
These links would help:
http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript
http://stackoverflow.com/questions/3753483/javascript-thousand-separator-string-formatr
Your Answer