I am using Standard Numeric Format Strings and Custom Numeric Format Strings to show values.
In this case they want values like:
- 123.0 to show as 123
- 123.4 to show as 123.40
- 123.44 to show as 123.44
That is, they want to show either zero or two decimals, never 1.
Now the first requirement I could solve by using “F0”. The second requirement I could solve by using custom numeric format string “0.00”. And the third case I could solve by using “F” (or “F2”). But in this case they want to handle all three cases in the same place. Is this possible by using some standard or custom numeric format string? Or do I need to create some special handling here?
1 Answer