Render Formatted Number for Data in Child Row

Render Formatted Number for Data in Child Row

mcarlottamcarlotta Posts: 11Questions: 4Answers: 0

I am trying trying to format field which is a number located within my child rows.

The current out is being displayed as (for example): 23.0
The Goal: 23.00

I have invoked the render.number script as follows:

{ 
                    "visible": false, "data": "ethnicity_demo_white", 
                    "title": "Demographic: White",
                    "render": $.fn.dataTable.render.number( '\.', '.', 2 )
            },

This works as expected when the column is visible. Once I implement "visible": false, the formatting removes itself.

Any ideas on a work around for this?

Answers

  • mcarlottamcarlotta Posts: 11Questions: 4Answers: 0

    Issue has been solved

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

    Hi,

    Good to hear you have a solution. Out of interest, what was it? The code you have above looks like it should work okay.

    Thanks,
    Allan

This discussion has been closed.