Pivot Panel - Field Settings: Format issue

Posted by: james.ingham on 20 April 2020, 6:35 pm EST

  • Posted 20 April 2020, 6:35 pm EST - Updated 3 October 2022, 4:29 pm EST

    Hi Wijmo team,

    We really love the PivotGrid feature. It is great!

    We met with a format issue though. When a user changes the formatting on a field and selects a default format from the dropdowns there are no issues. However, if a user tries to manually change decimal formatting away from the default, either 1) nothing happens or 2) the fields populates as text including details of the formatting.

    To resolve, the user has to manually clear all of the additional text that is populated by default in the field.

    E.g.

    Changing ‘Float (n2)’ to ‘Float (n4)’ doesn’t do anything. It must be changed to ‘n2’ (removing all other text) manually

    Changing ‘Currency (c)’ to ‘Currency (c2)’ causes the field to populate with text in all rows. It must be changed to ‘c2’ (removing all other text) manually

    Is it possible to do a fix or workaround so when a dropdown option is selected, it just populates the field in the modal box with the formatting code (e.g. ‘n2’ instead of ‘Float (n2)’) so this doesn’t have to be removed if changes are required?

  • Posted 21 April 2020, 4:23 am EST

    Hi James,

    We are glad that you liked the PivotPanel control and we really appreciate the feedback.

    Regarding your issue, we are sorry but there is no workaround for this. The values like ‘Currency (c)’ are predefined values. You cannot type a new value in the same format, like Currency (c4), because it cannot be parsed. That is why simply typing the format, like c4, works.

    But, you can add your custom formats in the drop-down. Please refer to the sample link below for a demonstration:

    https://stackblitz.com/edit/js-evq6b3

    Regards,

    Ashwin

  • Posted 27 April 2020, 6:49 am EST

    Thanks Ashwin for your example, which is very helpful. Is there a way to change the existing label, e.g.“Currency (c)” should be “Currency (c2)”?

    Regarding “Currency (c)”, it seems to actually work as c2. Is it a typo of Wijmo as well?

  • Posted 28 April 2020, 12:42 am EST

    Hi James,

    This is not a typo. Whenever we use a format without an decimal specifier, like c, f, n, etc, we automatically format it with 2 decimal places like c2, f2, n2, etc. This formatting is same as that of dot net framework:

    https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#the-currency-c-format-specifier

    ~regards

Need extra support?

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

Learn More

Forum Channels