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

RadNumericUpDown - "WHY BUG"?

1 Answer 73 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 06 Feb 2014, 12:15 PM
RadNumericUpDown - "WHY BUG"?


<telerik:RadNumericUpDown UpdateValueEvent="PropertyChanged" ValueChanged="RadNumericUpDown_ValueChanged"
         Value="{Binding Path=LineCount, Mode=TwoWay, FallbackValue=0}" IsInteger="True" Minimum="0" NullValue="0" Maximum="100" />
           
private void RadNumericUpDown_ValueChanged(object sender, Telerik.Windows.Controls.RadRangeBaseValueChangedEventArgs e)
{
    var rnudCounter = (sender as RadNumericUpDown);
    if (rnudCounter == null)
        return;    try
    {               
        rnudCounter.ValueChanged -= this.RadNumericUpDown_ValueChanged;                       
        TelerikMessage.Confirm("set old number or not?"), (s, ea) =>
        {
            if (ea.DialogResult == true)
            {
               return;
            }
            else
            {
                e.NewValue = e.OldValue;
                // (sender as RadNumericUpDown).Value = e.NewValue;
            }
        });                 
          
    }
    finally
    {
        rnudCounter.ValueChanged += this.RadNumericUpDown_ValueChanged;
    }
}



Telerik not like lambda expression. Why?
I triger valueChange only one time with simple click on control (-/+), but it entry into event RadNumericUpDown_ValueChanged() two times. Why?
I set property NewValue but value that control show is diferent. Why?



1 Answer, 1 is accepted

Sort by
0
kity
Top achievements
Rank 2
answered on 06 Feb 2014, 12:35 PM
May be problem is becouse biding and codebehind mismatch.
Tags
NumericUpDown
Asked by
kity
Top achievements
Rank 2
Answers by
kity
Top achievements
Rank 2
Share this question
or