Issue with regionalization of a wijmo grid displaying exponential notation

Posted by: david.nelson on 26 June 2018, 3:09 pm EST

  • Posted 26 June 2018, 3:09 pm EST - Updated 3 October 2022, 8:28 pm EST

    – I am using to a simple wijmo grid to display numbers

    – I am loading wijmo.culture.fr.min.js to localize to french which uses a comma “,” for a decimal delimiter

    in the attached screen print I observe the following:

    1. most numbers are good with the correct decial delimiter
    2. small numbers which are displayed in exponential notation are using a period “.” for a decimal delimiter. I beleive this is a bug. Can you please fix.

    Thank you

    David

  • Posted 27 June 2018, 9:03 am EST

    Hi,

    Since the Exponential format is not supported by Wijmo, could you please let us know more about your implementation of exponential format.

    If you are using Number.toExponential() method then the decimal delimiter is not localized because the grid identifies the value as a string rather than the number, in such a case you should use replace method and change the delimiter.

    Please refer to following code snippet

    var num=-678.890;
    num=num.toExponential(2).replace('.',wjcCore.culture.Globalize.numberFormat['.']);
    
    

    Here is an example of the same:- https://stackblitz.com/edit/angular-qsaabz?file=app%2Fapp.component.ts

    If you have a different implementation then please explain more about it or perhaps share a small sample so that we can investigate further.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels