Hi,
Total calc in footer returns NaN when column formatter is set to "number" or "currency"
When formatter setting is removed, the footer value is calculated and displayed correctly.
This is probably due to the fact that formatted value is handled as string io value.
Any way to solve this? I want to show the values using "," as dec separator and "." as thousands separator.
loadcomplete setting:
var grid = $("#customers"),
sum = grid.jqGrid('getCol', 'total', false, 'sum');
grid.jqGrid('footerData','set', { total: 'total: ' + sum });
Hi Richard,
I also get same problem. The solution is by Abu Ghufran;
If you remove String Total and just put sum it will work.
grid.jqGrid('footerData','set', {total:sum});
Reason is, it is trying to format string "Total" to Numeric value, which is not doable. Either you can put the summary data at some other column, instead at end of total column which has default formatter (non-numeric).
Regards…