$.fn.dataTable.render.number documentation?

$.fn.dataTable.render.number documentation?

ThomDThomD Posts: 334Questions: 11Answers: 43

Can somebody point me to the documentation for this? My google-foo is failing me this morning.

This question has an accepted answers - jump to answer

Answers

  • btreebtree Posts: 99Questions: 14Answers: 11
    Answer ✓

    Hi,

    from the source code copied.

    The options defined here can be used with the columns.render initialisation
    option to provide a display renderer. The following functions are defined:

    number - Will format numeric data (defined by columns.data) for
    display, retaining the original unformatted data for sorting and filtering.
    It takes 4 parameters:
    string - Thousands grouping separator
    string - Decimal point indicator
    integer - Number of decimal points to show
    string (optional) - Prefix.

    Cheers
    Hannes

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    Thanks. I didn't think to look in the source code for docs. D'oh!

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Yes, the renderers are something I've yet to get around to documenting on the site.

    Allan

  • ThomDThomD Posts: 334Questions: 11Answers: 43
    edited October 2015

    Wait, there's more than one? Off to the source code...

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Only numbers is built in. But more will be available as plug-ins.

    Allan

This discussion has been closed.