1

When a user goes to edit a number, I want to format a number to have a thousands separator in one case (and a percentage sign in another) but I want to be able to show absolutely all available digits of precision.

When the number is being displayed, its format is simply {0:0,0;-0,0; - }, (or {0:0,0.00;-0,0.00; - } to show two decimal places), but when my control goes into edit mode, I want to switch to displaying something very similar, but showing all available digits of precision. Is there any way to do this short of creating a format string that looks like this?

{0:0,0.#############################;-0,0.###...

I want to do something similar with percentages. I want to displayed value to be {0:0.00 %;-0.00 %; - } until the user activates the cell for editing, at which time the format should still be a percentage, but showing more digits of precision if they exist in the underlying value.

Thanks

Alain
  • 26,663
  • 20
  • 114
  • 184
  • will the "all available digits" not be determined by the actual numeric type? my point being, wouldn't that information be valuable in this case? – Mark Schultheiss Jan 27 '12 at 16:49

1 Answers1

1

This question is similar to yours. (The answer is that it's not possible with the .NET built-in custom numeric formatting.)

Community
  • 1
  • 1
dillenmeister
  • 1,627
  • 1
  • 10
  • 18