Render numeric format

Render numeric format

tsakaltsakal Posts: 15Questions: 6Answers: 0

Hello to all of you.

I'm pretty new to the dataTables environment.

I have a strange numeric format behaviour.

Exactly : In a numeric field column, there is an approximately zero value, presented as "-5.6843418860808e-14", unformatted. With internal render formatting ( { "data": "eposopis", render: $.fn.dataTable.render.number( '.', ',', 2, '€' ) }, into "columns": [ ... ] ), its presentation is "-€5,.00" (sic).

Have anyone experienced a similar situation?

Thank you
Evangelos

Answers

  • allanallan Posts: 63,686Questions: 1Answers: 10,500 Site admin

    "-5.6843418860808e-14"

    Unfortunately the built in number renderer doesn't appear to cope with exponential defined numbers - it wasn't something I had originally considered when writing that bit of code!

    I'm not sure what the best way of handling it is to be honest at the moment. I've added it to my todo list!

    Allan

  • tsakaltsakal Posts: 15Questions: 6Answers: 0

    Hello Allan.
    The value "-5.6843418860808e-14" appears in calculated from tringers field in the table.

    I'll wait for the solution of the problem

    thanks

    Evangelos

This discussion has been closed.