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

RadMaskedEditBox - field and the full number doesn't get highlighted

1 Answer 88 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Veteran
Dev asked on 24 Apr 2021, 10:51 AM

Hi Team,

   When click or double click in the field and the full number doesn't get highlighted on the RadMaskedEditbox.

 

Video Link : https://ttprivatenew.s3.amazonaws.com/pulse/suganya-gmail/attachments/16655538/TinyTake24-04-2021-01-52-14.mp4

We need to load the Phone number Textbox value as 713-000-0000 ("(###) ###-####") while loading but when i try to enter the value the RadMaskedEditbox value it should allow to type 18 characters ((###) ###-############)

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 26 Apr 2021, 09:51 AM

Hello, Rick,

According to the provided information, I suppose that you set the Mask property to the following string "(###) ###-####". The allowed values that the user can enter would be exactly as in the specified mask, not more.

If you need to select and highlight all the full number presented in the RadMaskedEditBox you can handle the Click/DoubleClick event and use the SelectAll method as shown below:

radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.DoubleClick += this.TextBoxItem_DoubleClick;

private void TextBoxItem_DoubleClick(object sender, EventArgs e)
{
    radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.SelectAll();
}

I hope this helps. Should you have further questions please let me know.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Suganya
Top achievements
Rank 1
commented on 27 Apr 2021, 11:51 AM

Thanks Nadya, This Solution works correctly.
Tags
MaskedEditBox
Asked by
Dev
Top achievements
Rank 1
Veteran
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or