jQuery UI Widgets Forums Grid Formatting currency

This topic contains 4 replies, has 2 voices, and was last updated by  Pietervk 6 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Formatting currency #98405

    Pietervk
    Participant

    Is there a way to format currency in a column as “€12.345,67”?

    I have tried with { text: ‘Krediet’, dataField: ‘Credit’, width: 105, cellsformat: ‘c2’ }

    This renders “$12,456.67”, even though on my PC, the currency format is specified as shown above.

    It is not necessary for my purpose to have c2 to be culture dependend, but I can’t find a way to get the dots and comma’s reversed, even when using ‘f2’.

    Thanks

    Pieter

    Formatting currency #98447

    Stanislav
    Participant

    Hello Pieter,

    Here is an old topic with the same question: Link

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    Formatting currency #98521

    Pietervk
    Participant

    Hi Stanislav, that topic is about the currency symbol, which helps, thanks.
    My question is also about the number formatting: i get 12,456.78 but in Dutch culture setting, it should be 12.456,78

    How can I get that?

    Thanks

    Pieter

    Formatting currency #98523

    Stanislav
    Participant

    Hello Pieter,

    Ah ok, so you can use

    localizationobj.decimalseparator = “.”;
    localizationobj.thousandsseparator = “,”;

    They are both located in the localizestrings in the Grid’s API.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    Formatting currency #98740

    Pietervk
    Participant

    Thanks, that works!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.