Skip to main content
12-Amethyst
November 20, 2019
Question

Format number without meaningful trailing zeros in Advanced Grid or Grid

  • November 20, 2019
  • 2 replies
  • 2201 views

In the Advanced Grid or Grid configuration, you can specify the number format as "0.00".

This results in 3.1415 being displayed as "3.14", but also 11 as "11.00", and 12.3 as "12.30"

Is there a possible format string to remove unnecessary zero's, so 3.1415 is displayed as "3.14", but 11 is displayed as "11" and 12.3 is displayed as "12.3"?

 

2 replies

20-Turquoise
November 20, 2019

Localization might help with that task: https://www.ptc.com/en/support/article?n=CS271227

1-Visitor
November 22, 2019

Hi @wvangeem ,

 

You can also consider writing a service to format the numbers before populating the grid with the data. That way you can determine which numbers are displayed with how many decimal numbers.