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

RadNumericBox strange behavior

3 Answers 21 Views
NumericBox
This is a migrated thread and some comments may be shown as answers.
Eddie
Top achievements
Rank 1
Eddie asked on 07 Apr 2019, 03:30 PM

I discovered some strange behavior in the RadNumericBox control. Values in the control are being changed while simply scrolling through a list.

I have created a minimal repro of the issue at the following repository:

https://github.com/EddieLotter/RadNumericBox.Anomaly

Please have a look and see if it is something I am doing incorrectly or if there is a problem with the control.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 09 Apr 2019, 03:14 PM
Hi Eddie,

Thank you for providing the repro project -  I have reviewed and it seems the erroneous behavior is caused by the x:bind binding used in NumericBox.  I've replaced it with regular binding like this:

<telerik:RadNumericBox Value="{Binding Number, Mode=TwoWay}" Maximum="{Binding NumberMax, Mode=OneWay}"
                Minimum="1" Grid.Column="1" AllowNullValue="False"
                AcceptsDecimalSeparator="False" ValueFormat="{}{0}" VerticalAlignment="Center" />

Please give it a try and let me know how it goes.

Regards,
Yana
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Eddie
Top achievements
Rank 1
answered on 10 Apr 2019, 12:03 AM

Thanks for having a look.

Changing the binding method does change the behavior, but the controls still show the incorrect value.

I have learned an important lesson. The order of the XAML parameters is significant. I had no idea! When I switch the position of the Maximum and Value parameters, the problem goes away. I am very relieved this was not a bug in the control or the framework. :)

0
Yana
Telerik team
answered on 10 Apr 2019, 05:47 AM
Hello Eddie,

I am glad to hear you've managed to resolve the case. Indeed, the xaml parser has some specifics and the order of the properties can lead to unexpected results.

Regards,
Yana
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
NumericBox
Asked by
Eddie
Top achievements
Rank 1
Answers by
Yana
Telerik team
Eddie
Top achievements
Rank 1
Share this question
or