NumericUpDown notifies about value changed when using left/right arrows

3 posts, 0 answers
  1. Paweł Polaczyk
    Paweł Polaczyk avatar
    8 posts
    Member since:
    Jul 2011

    Posted 30 Jan 2014 Link to this post

    I have the following XAML:

    <t:RadNumericUpDown Value="{Binding Number, UpdateSourceTrigger=PropertyChanged}" IsEditable="True" />

    when i focus the NumericUpDown field and press left or right arrow, the underlying Number property is being set.
    Why?
    The value did not change. And also in case of a RadWatermarkTextBox I do not observe such a behavior.
  2. Ventzi
    Admin
    Ventzi avatar
    114 posts

    Posted 03 Feb 2014 Link to this post

    Hi Paweł,

    Thank you for reporting this bug. I've logged it into our feedback portal where you could vote and track it's current status. 

    Meanwhile I could offer you a workaround which you could find in the attached project. Basically you need to inherit the RadNumericUpDown and overriding the OnKeyDown method in which you could determine which key should be handled or not. Please take a look into the sample project and if you have any questions or concerns regarding this issue don't hesitate to contact us again.

    Once again we are sorry for the inconvenience caused. Your Telerik points were updated for your cooperation.

    Regards,
    Ventzi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Paweł Polaczyk
    Paweł Polaczyk avatar
    8 posts
    Member since:
    Jul 2011

    Posted 05 Feb 2014 in reply to Ventzi Link to this post

    Hi Ventzi,

    Thank you for your answer and logging the bug in the feedback portal.

    I am afraid your workaround does not work.
    If I set e.Handled = false; and return then the underlying property is still being updated.

    (If I set e.Handled = true; and return then the underlying property is not being updated, but also cursor does not move anymore.)

    I have a different workaround which is to check in a property setter whether the value has been actually changed.
Back to Top