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

RadMaskedNumericInput and byte

2 Answers 52 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 15 Mar 2017, 02:24 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 20 Mar 2017, 11:39 AM
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.
0
Dario Concilio
Top achievements
Rank 2
answered on 20 Mar 2017, 12:37 PM
ok, thank you, you have answered my question. :-)
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Petar Mladenov
Telerik team
Dario Concilio
Top achievements
Rank 2
Share this question
or