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

Why can I only input 3 digits - RadMaskedCurrencyInput

2 Answers 99 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 19 Aug 2015, 01:41 AM

 When I use this control or the numeric control I can only type 3 digits and 2 are positioned after the decimal, if I keep typing digits it just overwrites the last decimal place.  Initial value is zero, decimal property, version 2015.2.623.45.

<telerik:RadMaskedCurrencyInput Width="100"
                                InputBehavior="Replace"
                                Mask="c9.2"
                                SelectionOnFocus="SelectAll"
                                Value="{Binding TotalAmount}"
                                Culture="en-CA"
                                Grid.Column="5"
                                Grid.Row="1"
                                HorizontalContentAlignment="Right"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top" />

public decimal TotalAmount
{
    get
    {
        return workDetail.Total;
    }
    set
    {
        if (workDetail.Total != value)
        {
            workDetail.Total = value;
            OnPropertyChanged("TotalAmount");
        }
    }
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Peshito
Telerik team
answered on 19 Aug 2015, 10:41 AM
Hi Patrick,

This behavior is caused by the InputBehavior property. If set to "Replace" it replaces the text from the first position which in the current  scenario is left from the separator ( . ) symbol and then replaces the value on separator's right side.

I would recommend you to use the "Insert" InputBehavior. This way the values will be inserted where the cursor is.

The "Replace" value is the preferred way in scenarios where the textbox space is limited.

AutoFillZeros = True could also support the Replace mode because you will be able to replace the auto filled zeros when typing. You can see this in action using our online demo example here.

Hope this helps.

Regards,
Peshito
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Patrick
Top achievements
Rank 1
answered on 19 Aug 2015, 02:42 PM
Ok, thanks that fixed it.  
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Patrick
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or