Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > NumericUpDown > RadNumericUpDown doesn't fire event MouseLeftButtonUp -> Notify Value after user stops to click

Not answered RadNumericUpDown doesn't fire event MouseLeftButtonUp -> Notify Value after user stops to click

Feed from this thread
  • Marcelo avatar

    Posted on Jul 4, 2011 (permalink)

    Hi guys,

    I'm developing a control that has a lot of numeric and text "inputs" to update other controls.

    I need to update just when the value changes "completely", because my other controls will call the service if the event of update be fired.

    So, what I want is just fire the notify of value when user stops to click on the control.

    I did something like this on RadSlider using IsDeferredDraggingEnabled='True'

    public class PWSlider : RadSlider
      {
          public double PWValue
          {
              get { return (double)GetValue(PWValueProperty); }
              set { SetValue(PWValueProperty, value); }
          }
     
          // Using a DependencyProperty as the backing store for PWValue.  This enables animation, styling, binding, etc...
          public static readonly DependencyProperty PWValueProperty =
              DependencyProperty.Register("PWValue", typeof(double), typeof(PWSlider), new PropertyMetadata(OnPWValuerPropertyChanged));
     
          private static void OnPWValuerPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
          {
              if ((o as PWSlider).Value != (double)e.NewValue)
                  (o as PWSlider).Value = (double)e.NewValue;
          }
     
          public PWSlider()
          {
              this.ValueChanged += new RoutedPropertyChangedEventHandler<double>(PWSlider_ValueChanged);
          }
     
          void PWSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
          {
              PWValue = e.NewValue;
          }
      }



    Any thoughts to how implement this on RadNumericUpDown?

    Reply

  • Konstantina Konstantina admin's avatar

    Posted on Jul 7, 2011 (permalink)

    Hello Marcelo,

    I suggest you to use the UpdateValueEvent property of the NumericUpDown control and set it to LostFocus.

    Hope this helps.

    Regards,
    Konstantina
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

  • Marcelo avatar

    Posted on Jul 7, 2011 (permalink)

    Hi Konstantina,

    Sorry, but didn't work as expected.

    UpdateValueEvent="PropertyChanged"
    and
    UpdateValueEvent="LostFocus"

    work on the same way on this example:

    <telerik:RadNumericUpDown x:Name="numeric" UpdateValueEvent="LostFocus" Value="10" Maximum="120000" Minimum="0"/>
          <TextBox Text="{Binding ElementName=numeric, Path=Value}" Grid.Column="1"></TextBox>

    Just to clarify, what I want is update the value on the binding just when the user stop to click, as this example above.

    (just to know, my RadControls version: 2011.1.419.1040)

    Reply

  • Valeri Hristov Valeri Hristov admin's avatar

    Posted on Jul 15, 2011 (permalink)

    Hi Marcelo,

    Unfortunately the behavior that you need is not available in RadNumericUpDown. I apologize for the inconvenience.

    Greetings,
    Valeri Hristov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > NumericUpDown > RadNumericUpDown doesn't fire event MouseLeftButtonUp -> Notify Value after user stops to click
Related resources for "RadNumericUpDown doesn't fire event MouseLeftButtonUp -> Notify Value after user stops to click"

Silverlight NumericUpDown Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]