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

Event for Spinner Click

1 Answer 49 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 2
Greg asked on 20 Aug 2009, 02:37 AM
Is there an event that indicates when the value has changed via the spinner not just that the value has changed? I have a situation where a change in the value from the spinner results in rebinding the value which triggers the ValueChanged event which rebinds... A spinner click or something equilivent would solve the issue or even better would be the ability to suppress the value change event when the cause of the change is data binding vs. the UI.

1 Answer, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 20 Aug 2009, 09:48 AM
Hi Greg,

There is no event that indicates whether the value is changed from the spinner or the textbox, because it is not needed. If you have a custom logic and you don't need your RadNumericUpDown to be updated before some other events you can the UpdateSourceTrigger in the binding expression to Explicit. For example, consider the following case where the value is bind to property Age. The binding expression will look similar to this:

<telerik:RadNumericUpDown  x:name="numeric" Value="{Binding Age,Mode=TwoWay, UpdateSourceTrigger=Explicit}"/>

In this way, the control will not call the setter method of the age property until you explicitly don't instruct it. If you want to update the age value, you need to call UpdateSource() method part of the Binding expression like this.

BindingExpression expression = numeric.GetBindingExpression(RadNumericUpDown.ValueProperty);
expression.UpdateSource();

Does this resolve your issue? If you need any further assistance don't hesitate to contact us again.

Regards,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
NumericUpDown
Asked by
Greg
Top achievements
Rank 2
Answers by
Hristo Borisov
Telerik team
Share this question
or