Event for Spinner Click

2 posts, 0 answers
  1. Greg
    Greg avatar
    23 posts
    Member since:
    Sep 2008

    Posted 19 Aug 2009 Link to this post

    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.
  2. Hristo Borisov
    Hristo Borisov avatar
    298 posts

    Posted 20 Aug 2009 Link to this post

    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);

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

    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.
  3. DevCraft banner
Back to Top