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

Why is RadNumericUpDown.Value property not bound to double? type property?

3 Answers 71 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 20 Sep 2016, 06:47 AM

I have the following property in my ViewModel:

public double? MinimalValue
{
   get { return this._minimalValue; }
   set { this.SetProperty(ref this._minimalValue, value); }
}

In XAML I try to bind RadNumericUpDown.Value property to abovementioned property in the following way:

<telerik:RadNumericUpDown Grid.Row="0" Grid.Column="1" Height="30" Margin="0 30 10 0" IsEditable="True" Value="{Binding MinimalValue, Mode=TwoWay}"/>

But the following error occurs: 'Value' local property is applied only to the types that are derivative from 'RadRangeBase'. So can I bind  RadNumericUpDown.Value property to the property in my ViewModel or not?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 21 Sep 2016, 09:01 AM
Hi Yaroslav,

We have tested the described scenario, but couldn't observe any issues - the Value is binding as expected to a property of type "double?". Please, check the attached sample that demonstrates that.

Could you please, try to provide us some more details that will help us reproduce the issue on our side and inside the project we are sending you?

Looking forward to hearing from you.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dmitry
Top achievements
Rank 1
answered on 21 Sep 2016, 12:07 PM
Thank you, Nasko. But I've already solved this problem by using of RadNumericUpDown.ValueChanged event handling. I map the handling of this event to ViewModel by 'telerik:EventToCommandBehavior.EventBindings' and assign NewValue value to property which I need. Thanks for your support and help.
0
Nasko
Telerik team
answered on 21 Sep 2016, 01:05 PM
Hi Yaroslav,

I am glad to here you were able to resolve your issue and now everything is working as expected for you. Thank you also for sharing your approach with the community.

If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
NumericUpDown
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Dmitry
Top achievements
Rank 1
Share this question
or