In wijmo gird give number format according to cell value

Posted by: akumar on 18 January 2019, 2:46 am EST

    • Post Options:
    • Link

    Posted 18 January 2019, 2:46 am EST

    Hi,

    I am using wijmo grid in angular js web app i have query regarding number format in wj grid i have using format =nX(x is dynamic value ex… n2,n3,n4 ) according user requirement but in grid some cell i am using same grid col as value/ quantity so i have set format =nx dynamic like in case of value i want to show whole number and in case of quantity i want to show in decimal format in same cell ,also if we use format = n3 ,0 is show 0.000 i want show 0 as 0 is every nx format. basically first have to check what is value rendering in cell after decides which format is allow n0,n3 etc…

  • Posted 20 January 2019, 6:12 pm EST

    Hi,

    Wijmo support .NET Standard Numeric Format Strings, so to display the available no of decimal places instead of fixed decimal you may use the gX format where X is the max no of decimals to show. You may set X to a really high number say 99 and then the numbers will be formatted accordingly.

    Please refer to the following doc for more info on the supported Number formats:

    https://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.Globalize.Class.html#formatNumber

    https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings

    You may also refer to the following sample demonstrating the same: https://jsfiddle.net/jr4pq139/3/

    ~Sharad

Need extra support?

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

Learn More

Forum Channels