This is a migrated thread and some comments may be shown as answers.

Int Max

2 Answers 90 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Phillip Garrett
Top achievements
Rank 1
Phillip Garrett asked on 22 Jun 2010, 11:51 AM

Hi,

I'm having trouble using RadNumericUpDown's Maximum and Minimum fields. I want to restrict the user inputting values > Int32.MaxValue and < Int32.MinValue; which are defined in c# as:

public const int MaxValue = 2147483647;
public const int MinValue = -2147483648;

So I set my Maximum and Minimum fields accordingly for my RadNumericUpDown box. However when I put a very large number into the box, the value is adjusted to 2147483648 (note ends in 8 not 7). Alternatively if a put a very low number in the value gets set (correctly) adjusted to -2147483648.

Could you explain why the automatic adjustment is not picking up my Maximum value I give it?

Thanks,
Phill

2 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 24 Jun 2010, 04:52 PM
Hi Phillip Garrett,

Thank you for contacting us.

We were able to reproduce the issue. I am glad to give you 500 points for reporting this abnormal behavior of our RadNumericUpDown control. We will consider fixing this bug in one of our future releases. You can track this progress in our Public Issue Tracking System (PITS) with Issue ID = 2532.
However, you can workaround it setting Maximum property through the code-behind, not in xaml. 

I hope this information helps. I will be glad to assist you further.

Best wishes,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mary
Top achievements
Rank 1
answered on 02 Jul 2010, 05:01 PM
We are encountering similar problem.

Here is how the control defined in XAML:

<

 

telerikInput:RadNumericUpDown x:Name="Number1" TabIndex="320" MinWidth="120" Margin="0,-4,8,1" Grid.Row="0" Grid.Column="1"/>

Here is how we set the properties value in the code behind:

 

Number1.

NumberFormatInfo.NumberDecimalDigits = 3;

 

Number1.

Maximum = 999999999999999;

 

 

 

Number1.

Minimum = -999999999999999;

if we key in 1234567890123.67 (13 digits),  value of the control does not change, keep as 1234567890123.67
if we key in 12345678901234.67  (14 digits), value of the control changes to 12345678901234.70
if we key in 123456789012345.67  (15 digits), value of the control changes to 12345678901236.00

 

Tags
NumericUpDown
Asked by
Phillip Garrett
Top achievements
Rank 1
Answers by
George
Telerik team
Mary
Top achievements
Rank 1
Share this question
or