Value greater than 100 problem

6 posts, 0 answers
  1. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 22 May 2013 Link to this post

    Hello,
    I use this control in my app like this:
    <Controls:RadNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Value="170" MaxValue="250" MinValue="50" />

    But when I use value greater than 100, it shows 100. I'm able to change it by + / - buttons above 100 but every time I open this form I see 100. Values below 100 are OK. I also used databinding to my class and works same way. All values above 100 desnt display correctly. What I'm doing wrong?


  2. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 23 May 2013 Link to this post

    Hi Martin,

    Thanks for writing.

    I would like to inform you that we have been able to reproduce the issue on our side. The reason for this behavior is that the MaxValue of the NumericUpDown is 100 by default. When you set your new value it is clamped to 100 if it is greater than 100. Your workaround is to first set the MaxValue to a greater value and after that set the Value property.

    Since we consider this an incorrect behavior, we will update the control in an upcoming release to allow setting these properties in any order.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 23 May 2013 Link to this post

    Hi Deyan,
    in reallife scenario I dont use static Value. I use databinding in XAML like this:
    <Controls:RadNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Value="{Binding HeightSetting, Source={StaticResource Config}, Mode=TwoWay}" MaxValue="250" ValueFormat="" />

    So I don't know how to workaround this problem in current version. How I could set max value before databinding?


  5. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 23 May 2013 Link to this post

    Hi Martin,

    Can you please move the portion of the XAML code that sets the MaxValue before the Value binding and let me know if it works for you?

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  6. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 23 May 2013 Link to this post

    Hi,
    yes it works. Thank you very much for help!

  7. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 27 May 2013 Link to this post

    Hi Martin,

    We will consider this thread closed for now.

    Let us know should you have further questions or need assistance.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top
DevCraft banner