Is it possible to change the "Hide Trailing Zeros" property programmatically.
I realize that it can be easily changed statically in the development environment, but I would like to change them programatically based on a user selection.
Solved! Go to Solution.
It's the Format String property
%.3f for 3 digits of precision and %.0f for no decimal places.
You can use this code to hide the trailing zeros:
This code will convert your number with 3 decimals but zeros will be truncated.
1.2345 will be converted to 1.234 and 1.2300 will be converted to 1.23