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

RadMaskedNumericInput only returning 1 decimal place when 2 are input

1 Answer 102 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 24 Sep 2015, 12:07 AM

I have an issue with RadMaskedNumericInput where the value returned only has 1 decimal even the 2 decimals were input.

The xaml looks like this:

<telerik:RadMaskedNumericInput
    Name="AddHours"
    Width="75" 
    Mask="#,###.##"
    SelectionOnFocus="SelectAll"
    Value="{Binding AddHours}" 
    UpdateValueEvent="LostFocus"
    Culture="en-CA"
    Grid.Column="3" Grid.Row="1"
    HorizontalContentAlignment="Right"
    HorizontalAlignment="Left"
    VerticalAlignment="Top"
    Margin="3" Padding="2" 
    Style="{StaticResource HoursStyle}"        PreviewKeyDown="RadMaskedNumericInput_PreviewKeyDown"
 />

Bound Property

public decimal AddHours
{
    get { return addHours; }
    set
    {
        if (addHours != value)
        {
            addHours = value;
            OnPropertyChanged("AddHours");
 
        }
    }
}

I've tried specifying the mask differently but same behaviour with other configurations.  ???

1 Answer, 1 is accepted

Sort by
0
Patrick
Top achievements
Rank 1
answered on 24 Sep 2015, 12:15 AM
Sorry, I figured this out it was the preview key routine causing the issue.
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Patrick
Top achievements
Rank 1
Answers by
Patrick
Top achievements
Rank 1
Share this question
or