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

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

 

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Format number without meaningful trailing zeros in Advanced Grid or Grid

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
Highlighted

Re: Format number without meaningful trailing zeros in Advanced Grid or Grid

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

Highlighted

Re: Format number without meaningful trailing zeros in Advanced Grid or Grid

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.

Highlighted

Re: Format number without meaningful trailing zeros in Advanced Grid or Grid

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

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!