Wijmo flexgrid/flexsheet formatting inconsistent with cells containing formulas

Posted by: curiosichi on 21 September 2022, 6:04 am EST

    • Post Options:
    • Link

    Posted 21 September 2022, 6:04 am EST - Updated 3 October 2022, 2:41 am EST

    My goal is to show values with no decimal, whole values only.

    To demonstrate the issue, I used the Format Cells demo:

    https://www.grapecity.com/wijmo/demos/Grid/FlexSheet/FormattingCells/angular

    When I enter “1568801” in a cell on Row 1 of the formatting, it shows as expected, 1568801.

    When I enter “=1568801” in a cell on Row 2, it adds decimals. No matter what the cell styling is, I can’t remove/hide the decimals. I tried setting the style to n0, but no difference was found.

    This is present in my app with other sets of formulas, the problem seems to be present for any number in a calc.

    Expected result: number formatting on a cell (such as n0) should be respected in the result of a returned value for a formula cell.

  • Posted 21 September 2022, 6:14 pm EST

    Hello,

    We apologize but we are unable to replicate the issue on our end. On applying the format ‘n0’ to a cell with formula(“=1568801”) applied using applyCellStyle() method, the format is applied to the cells properly. You can confirm the same from the sample link below:

    https://stackblitz.com/edit/angular-v7ern4?file=src%2Fapp%2Fapp.component.ts

    You can also apply the format on the column level by setting the property of that column to ‘n0’.

    Could you please confirm if you are facing the issue in the above-shared sample as well, if so please share a small sample replicating the issue so that we can investigate the root cause and assist you accordingly?

    Regards

  • Posted 22 September 2022, 10:11 am EST

    While I can’t explain why this issue is present on the flexsheet demo when modified to n0, your further simplified stackblitz shed light on the fact an issue is not present at the core of the library, and I’ve now addressed the problem in my project accordingly.

    Thank you!

Need extra support?

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

Learn More

Forum Channels