How to enter decimal values in a NumericUpDown with an Increment equal to 1?

  • Thread starter Thread starter Frederic
  • Start date Start date
F

Frederic

I have a NumericUpDown field in a form, with increment set to 1, min
set to 0 and max set to 10000.

My problem is that when the user types something like "4.44" (or even
"4,44"), the Value property is 0. However, when inspecting the embedded
scrollable control, I can see that its Text property is "4.44").

When the user types "4" then everything is OK, I get a Value equal to
4.

Do you know what to do to be able to get a decimal value correctly?

(I am not using DataBinding for this control).

Thanks for your help,
Frédéric
 
I finally managed to make it work by parsing the Text property when
validating the control, and taking no care of the Value property.
 
Back
Top