fnFormatNumber: an example?

fnFormatNumber: an example?

GerardoGerardo Posts: 66Questions: 0Answers: 0
edited May 2010 in General
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

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Gerardo,

    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
  • GerardoGerardo Posts: 66Questions: 0Answers: 0
    Oh, my mistake :-)

    Thanks!
This discussion has been closed.