fnFormatNumber: an example?
fnFormatNumber: an example?
How to use it?
I want to format a column with two decimals, using
fnRender: function ( obj ) {
var num = obj.aData[obj.iDataColumn];
return num.toFixed(2);
},
right now, how to use fnFormatNumber instead?
Thanks,
Gerardo
I want to format a column with two decimals, using
fnRender: function ( obj ) {
var num = obj.aData[obj.iDataColumn];
return num.toFixed(2);
},
right now, how to use fnFormatNumber instead?
Thanks,
Gerardo
This discussion has been closed.
Replies
fnFormatNumber is used to format the numbers in the information element at the bottom (by default) of the table ("Showing 10 of 10,000 records" for example). It is not used for formatting numbers in a column. For that you would use fnRender - which it looks like you are already doing :-).
Allan
Thanks!