Questions tagged [numericupdown]

NumericUpDown is a WPF/WinForm control that represents a numeric textbox that can be increased or decreased in value. With many properties and event handlers, the NumericUpDown control is ideal for user interfaces where a number is entered or adjusted.

271 questions
6
votes
5 answers

C# Random Password Generator

Here is the code: (passwordLengthBox is a NumericUpDown Box, r and k are random numbers) private void generateButton_Click(object sender, EventArgs e) { int r, k; int passwordLength =…
Michael Yochpaz
  • 177
  • 1
  • 2
  • 12
6
votes
7 answers

Check if NumericUpDown is empty

How do I check whether the user left a NumericUpDown control empty, removing the value on it? So I can reassign it a value of 0.
Alan Mcgilvray
  • 81
  • 2
  • 2
  • 4
6
votes
1 answer

NumericUpDown allows user to type a number greater than maximum

I have a NumericUpDown variable in my class. The minimum and maximum values are set as follows: myNumericUpDown.Maximum = 9999; myNumericUpDown.Minimum = 0; This prevents the spin box from exceeding 9999 or going below 0. The problem I am having is…
Jan Tacci
  • 2,931
  • 16
  • 56
  • 82
5
votes
5 answers

how do i restrict numericupdown control to accept only integers

I have a windows numericupdown control. I want to restrict it so that user can only enter integers in it. How do I do that? At present a user can enter a decimal number as well. Thanks PS I am using .net
umbersar
  • 1,444
  • 2
  • 17
  • 30
5
votes
4 answers

Can I hide Value in NumericUpDown control?

Lets say we have 0 displayed in value field of the control and I want that if the value is 0 - display string.Empty (I know that the type of value is decimal and there can be no string inserted instead of decimals in it, but still... Maybe there is…
0x49D1
  • 7,869
  • 11
  • 65
  • 119
5
votes
4 answers

c# Numericupdown to pass a value to an integer

I'm having a problem passing a numericupdown value into an integer. private void button5_Click(object sender, EventArgs e) { int count = numericUpDown1.Value; updateCount(count); } So, what I want to do is pass the value of the…
112358d
  • 99
  • 1
  • 1
  • 10
5
votes
4 answers

adding a sign to numericUpDown value (like %)

I am trying to add "%" sign to my numericUpDown that is readonly=false. So it's like 5% for example. Is this possible? Thanks
Razor
  • 635
  • 7
  • 17
5
votes
3 answers

Don't allow text entry in numericUpDown

I have a WinForm in C# with an NumericUpDown Control on it. I want the Control to change its value only after clicking on its up or down arrow, and to block the manual text entries, is there a property of NumericUpDown to do this, or any other way…
Pablo Elias
  • 102
  • 1
  • 2
  • 8
4
votes
1 answer

How make two way binding numericUpDown to member class

I need twoway binding configClass.RaMsize to numericUpDown. BindField(this.upDownRamSize, "Value", configClass, "RaMsize");//all right this.upDownRamSize.Value = 1213;// configClass.RaMsize - not change - it's bad! Method: public static void…
Mediator
  • 13,836
  • 33
  • 104
  • 177
4
votes
0 answers

'DefaultValue' property was already registered by 'Xceed_Wpf_Toolkit_NumericUpDown`1_12_151463089'

Error Description I've searched for this error but every other topic was involving C# code and metadata/dependency overridings. But my problem actually involves only and just XAML declarations (of course, it has "MyControl.xaml" and…
JPTIZ
  • 41
  • 4
4
votes
2 answers

Is there a numericupdown event for value increasing in c#

I need an event that happens when the up arrow is pressed and another when the down arrow is pressed. is there an event handler for this? all I can find is valuechanged?
john
  • 159
  • 2
  • 15
4
votes
4 answers

How do I stop a NumericUpDown from playing 'Ding' sound on EnterKeyPress

I have a few NumericUpDown controls on my form, and everytime I hit the enter key while it is active, it plays this horrible DING noise, right in my ears. It plays if I don't handle the KeyPress event, and it plays if I do handle the KeyPress event,…
Shadow
  • 3,666
  • 4
  • 17
  • 40
4
votes
1 answer

Null values for integers are not displayed properly by the Telerik NumericUpDown control

We are using the Telerik RadNumericUpDown control (2013 version) in our application to display & edit both double values and integers; The control works fine for nullable double types: it displays nothing for a null value, and 0.00 for the 0…
Cornel Marian
  • 2,273
  • 20
  • 27
4
votes
2 answers

NumericUpDown control for Percentages?

How can I set a NumericUpDown control to display values as percentages?
MCattle
  • 2,497
  • 2
  • 30
  • 49
4
votes
1 answer

NumericUpDown in Datagrid

I have a WPF window that holds a bunch of numbers. Or to use nicer words: Each column is bound to one int property. Now I want to have a nice way to change some of the numbers and I was hoping that I can use a numericUpDown control. Any hints would…
Jan
  • 2,099
  • 2
  • 17
  • 28
1
2
3
18 19