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

NumericUpDown notifies about value changed when using left/right arrows

2 Answers 102 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Paweł Polaczyk
Top achievements
Rank 1
Paweł Polaczyk asked on 30 Jan 2014, 09:59 AM
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 Answers, 1 is accepted

Sort by
0
Ventzi
Telerik team
answered on 03 Feb 2014, 02:00 PM
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 >>
0
Paweł Polaczyk
Top achievements
Rank 1
answered on 05 Feb 2014, 09:37 AM
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.
Tags
NumericUpDown
Asked by
Paweł Polaczyk
Top achievements
Rank 1
Answers by
Ventzi
Telerik team
Paweł Polaczyk
Top achievements
Rank 1
Share this question
or