473,563 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NumericUpDown set the Value property outside the bounds

3 New Member
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 - ArgumentOutOFRa ngeExeption 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
4 1557
dip_developer
648 Recognized Expert Contributor
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 - ArgumentOutOFRa ngeExeption 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
JuG
3 New Member
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
648 Recognized Expert Contributor
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 - ArgumentOutOFRa ngeExeption 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
JuG
3 New Member
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 ArgumentOutOfRa ngeExaption. 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

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

Similar topics

21
9846
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
21
2402
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
21
447
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
3
30096
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me set all numericupdown autoselect text when gotfocus?
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.