RadMaskedNumericInput and byte

3 posts, 1 answers
  1. Dario Concilio
    Dario Concilio avatar
    172 posts
    Member since:
    Apr 2016

    Posted 15 Mar Link to this post

    I have a view that contains a RadMaskedNumericInput that has Value property with binding to my model inside my viewmodel.

    <telerik:RadMaskedNumericInput Value="{Binding CurrentItem.NumeroMatricole,Mode=TwoWay}" Grid.Row="6" Grid.Column="1" Style="{StaticResource FieldMax3IntegerRadMaskedInputNumericStyle}" />

     

    private byte numeroMatricole;
    public byte NumeroMatricole
    {
        get { return numeroMatricole; }
        set
        {
            numeroMatricole = value;
            NotifyPropertyChanged("NumeroMatricole");
        }
    }

     

    Now, when I try to update other properties of CurrentItem, it works all.

    When I change value in this control (that is unique with MaskerNumeriInput and it is unique that point to NumeroMatricole property that is a byte), NotifyPropertyChanged not fire.

    Is it possibile that RadMaskerNumeriInput doesn't support byte type?

  2. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2986 posts

    Posted 20 Mar Link to this post

    Hi Dario,

    The Value property of RadMaskedNumericInput is of type nullable double (double?). Also the flag of the dependency property - BindsTwoWayByDefault is set to True. So when you bind to byte - the domain of the double? does not match the domain of the byte - that is why some notifications fails.

    We highly encourage you to change the type of the NumeroMatricole proeprty to double?.

    Regards,
    Petar Mladenov
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Dario Concilio
    Dario Concilio avatar
    172 posts
    Member since:
    Apr 2016

    Posted 20 Mar in reply to Petar Mladenov Link to this post

    ok, thank you, you have answered my question. :-)
Back to Top