RadNumericBox strange behavior

4 posts, 0 answers
  1. Eddie
    Eddie avatar
    2 posts
    Member since:
    Apr 2019

    Posted 07 Apr Link to this post

    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.

  2. Yana
    Admin
    Yana avatar
    4896 posts

    Posted 09 Apr Link to this post

    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
  3. Eddie
    Eddie avatar
    2 posts
    Member since:
    Apr 2019

    Posted 09 Apr in reply to Yana Link to this post

    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. :)

  4. Yana
    Admin
    Yana avatar
    4896 posts

    Posted 10 Apr Link to this post

    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
Back to Top