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

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
 
F

Frederic

I finally managed to make it work by parsing the Text property when
validating the control, and taking no care of the Value property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top