NumericUpDown Event Example

Thread is closed for posting
3 posts, 0 answers
  1. Jon
    Jon avatar
    4 posts
    Member since:
    Apr 2012

    Posted 09 May 2012 Link to this post


    I have an App that uses the NumericUpDown to update a TextBlock. I'm having trouble writing the ValueChanging Event Handler. Does anyone have an example of a Value Changing Event Handler I can use?

  2. Deyan
    Deyan avatar
    2147 posts

    Posted 10 May 2012 Link to this post

    Hello Jon,

    Thanks for writing.

    Subscribing for the ValueChanging event handler is as simple as the following:

        this.radNumericUpDown.ValueChanging += this.radNumericUpDown_ValueChanging;
    void radNumericUpDown_ValueChanging(object sender, Windows.Controls.ValueChangingEventArgs<double> e)

    The radNumericUpDown_ValueChanging method is the so-called event handler that will be called in case the ValueChanging event occurs. It is up to you and to the specifics of your app what code you will execute in this method.

    I hope this helps.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Vijay
    Vijay avatar
    29 posts
    Member since:
    Nov 2011

    Posted 10 Jun 2012 Link to this post

    Hello Jon,

    Please find the below source code. Hope this should be useful.

    private void radNum_ValueChanging(object sender, Windows.Controls.ValueChangingEventArgs<double> e)
      if (numericUpDown1.Value + numericUpDown2.Value + numericUpDown3.Value > 3)
                e.Cancel = true;
                RadWindow.Alert("No more than 3 in total");

    Thanks and Regards,
    MVC Corp.

Back to Top