Wijmo flexgrid decimal data being rounded

Posted by: venkata.vimjam on 19 November 2018, 3:26 pm EST

    • Post Options:
    • Link

    Posted 19 November 2018, 3:26 pm EST

    Wijmo’s itemsource is removing the .0 in the decimal data. Not just the UI part but when saving the itemsSource or the editableCollectionView items the .0 is being removed completely.

    Ex: Considering below data source row 1 column 1 will show 4 instead of 4.0. Yes i can set the format as N1 but that seems to be only applicable to UI.

    Is there a solution where when number type column is given 4.0 in data source it remains the same when saving too ?

    data source : [[4.0,“Unleaded87”],[5.25,“Unleaded91”]]

    wijmo version : 5.20181.436

    framework : vue js

  • Posted 20 November 2018, 12:00 am EST

    Hi,

    The observed behaviour is Js default behaviour, it automatically trims redundant zeroes from the number type.

    If you would like to store the trailing zeros as well, then you need to change the dataType to ‘Strings’.

    ~Sharad

Need extra support?

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

Learn More

Forum Channels