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

ValueChanged Event is not fired

3 Answers 151 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Vit100
Top achievements
Rank 1
Vit100 asked on 02 Dec 2010, 10:19 PM
<telerik:RadNumericUpDown Value="{Binding Path=Question.Response, Mode=TwoWay}"  ValueChanged="RadNumericUpDown_ValueChanged" />

private void RadNumericUpDown_ValueChanged(object sender, Telerik.Windows.Controls.RadRangeBaseValueChangedEventArgs e)
       {
           var bindExpression = ((RadNumericUpDown)sender).GetBindingExpression(RadNumericUpDown.ValueProperty);
           bindExpression.UpdateSource();
       }

Code above should be called everytime value in NumericUpDown is changing.. Yes, it is fired if you use arrows, but if you type manually into textbox it is not untill control looses focus....
Unfortunantely RadNumericUpDown doesn't have ValueChanging event...

P.S.
NumericUpDown from toolkit also has event ValueChanging, but also does not fire it if text entered manually... Similar bug.

Pls advise.

3 Answers, 1 is accepted

Sort by
0
Accepted
Boyan
Telerik team
answered on 03 Dec 2010, 01:12 PM
Hello,

The Value of RadNumericUpDown is updated on losing focus by default, so the ValueChanged event is triggered then as well. However there is a way to change when the Value is updated. Just set : UpdateValueEvent="PropertyChanged". This will update the Value on every keystroke.

Hope this helps. Let me know if you have further questions.

Greetings,
Boyan
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Vit100
Top achievements
Rank 1
answered on 03 Dec 2010, 03:03 PM
Amazing.
Thanks.
I see that with  UpdateValueEvent="PropertyChanged"  i even don't need  RadNumericUpDown_ValueChanged event handler in code behind...

Nice job. I love your controls!!!
0
Sajid Ali
Top achievements
Rank 2
answered on 30 Apr 2013, 07:10 AM
thanks it was really a helpfull post
Tags
NumericUpDown
Asked by
Vit100
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Vit100
Top achievements
Rank 1
Sajid Ali
Top achievements
Rank 2
Share this question
or