cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Format number without meaningful trailing zeros in Advanced Grid or Grid

wvangeem
10-Marble

Format number without meaningful trailing zeros in Advanced Grid or Grid

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"?

 

1 ACCEPTED SOLUTION

Accepted Solutions

When upgrading to Advanced Grid 4.2.1 the behaviour seems to be what I wanted.

When you use configuration services for Advanced Grid, you can put the following in the JSON configuration:

"format": "0.00",

"params": {

  "roundingEnabled": false

}

This also solved the problem.

Best regards,

Wim.

View solution in original post

3 REPLIES 3
posipova
20-Turquoise
(To:wvangeem)

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

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.

When upgrading to Advanced Grid 4.2.1 the behaviour seems to be what I wanted.

When you use configuration services for Advanced Grid, you can put the following in the JSON configuration:

"format": "0.00",

"params": {

  "roundingEnabled": false

}

This also solved the problem.

Best regards,

Wim.

View solution in original post

Announcements