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

4 posts, 0 answers
  1. Yaroslav
    Yaroslav avatar
    122 posts
    Member since:
    Jan 2016

    Posted 20 Sep Link to this post

    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?

  2. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 21 Sep Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yaroslav
    Yaroslav avatar
    122 posts
    Member since:
    Jan 2016

    Posted 21 Sep in reply to Nasko Link to this post

    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.
  5. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 21 Sep Link to this post

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