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

RadMaskedEditBox literals issue

1 Answer 30 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Luc
Top achievements
Rank 1
Luc asked on 12 Feb 2016, 07:08 PM

Hi, I got an issue with the RadMaskedEditBox with standard phone mask (999) 000-0000. It works well when we enter only digits, but when we hit the keys like 123123-1234, the '-' skips the next character so I got text like this "(123) 123-_123". I'm not really familiar with telerik controls and I tried to find some way to avoid this without success. So is there a property or something else to avoid this problem or is there a real issue with the control itself. 

Thank you very much. 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 15 Feb 2016, 12:39 PM
Hi Luc,

Thank you for writing.

This is indeed an issue. We already have a simialr case logged in our Feedback Portal. You can track the item for status changes and add your vote for it here.

To workaround this, you can use the KeyDown event and manually change the position:
private void RadmaskedEditBox1_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == '-')
    {
        e.Handled = true;
        radmaskedEditBox1.MaskedEditBoxElement.TextBoxItem.SelectionStart += 1;
    }
}

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik

Tags
MaskedEditBox
Asked by
Luc
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or