By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,470 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,470 IT Pros & Developers. It's quick & easy.

NumericUpDown set the Value property outside the bounds

P: 3
Hi,

Is there any way to display a value in the NumericUpDown control that is bigger than Max or smaller than Min?

Especially when I am just creating the control, not when the user changes it !!!

As I can see there is a check happening whenever I am initializing the Value property. And if the value is outside the bounds - ArgumentOutOFRangeExeption is thrown. Is there any way to ignor this exaption or cancel it at all???

The idea in my project is - to show whatever value is stored in the database, allow user to change it and only when he presses 'ok' button , to check if the value is outside the range.

HELP PLEASE !!!!
Jun 8 '07 #1
Share this Question
Share on Google+
4 Replies


dip_developer
Expert 100+
P: 648
Hi,

Is there any way to display a value in the NumericUpDown control that is bigger than Max or smaller than Min?

Especially when I am just creating the control, not when the user changes it !!!

As I can see there is a check happening whenever I am initializing the Value property. And if the value is outside the bounds - ArgumentOutOFRangeExeption is thrown. Is there any way to ignor this exaption or cancel it at all???

The idea in my project is - to show whatever value is stored in the database, allow user to change it and only when he presses 'ok' button , to check if the value is outside the range.

HELP PLEASE !!!!
you are showing value in the numeris updown??
then its not possible to show vaule greater than the maximum
what do you actually want...I didnt understand
.....
Jun 8 '07 #2

P: 3
JuG
you are showing value in the numeris updown??
then its not possible to show vaule greater than the maximum
what do you actually want...I didnt understand
.....
I want to show the value in the NumericUpDown. And whant it to be outside the range.

NumericUpDown nud=new NumericUpDown();
nud.Min=10;
nud.Max=20;
nud.Value=30; //Any way to do that?????????

I know it is not possible in a given control design, but maybe there is some workaround?

It is not my idea to do so, but the project meneger's :)
Jun 8 '07 #3

dip_developer
Expert 100+
P: 648
Hi,

Is there any way to display a value in the NumericUpDown control that is bigger than Max or smaller than Min?

Especially when I am just creating the control, not when the user changes it !!!

As I can see there is a check happening whenever I am initializing the Value property. And if the value is outside the bounds - ArgumentOutOFRangeExeption is thrown. Is there any way to ignor this exaption or cancel it at all???

The idea in my project is - to show whatever value is stored in the database, allow user to change it and only when he presses 'ok' button , to check if the value is outside the range.
HELP PLEASE !!!!

The idea in my project is - to show whatever value is stored in the database, allow user to change it and only when he presses 'ok' button , to check if the value is outside the range.
plenty of ways to do that ....why are u using numericupdown???
Jun 8 '07 #4

P: 3
JuG
plenty of ways to do that ....why are u using numericupdown???
The main question is this:
I want to show the value in the NumericUpDown. And whant it to be outside the range.

NumericUpDown nud=new NumericUpDown();
nud.Min=10;
nud.Max=20;
nud.Value=30; //Any way to do that????????? Now it is throwing ArgumentOutOfRangeExaption. Is it possible to cancel this exaption or ignore it? I need to allow the value to be outside the range.

I know it is not possible in a given control design, but maybe there is some workaround?

It is not my idea to do so, but the project meneger's :)

The rest of the original question is just an explanation for the readers and does not require an answer.
Jun 8 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.