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

Paste copied text into MaskedEditBox not working

5 Answers 131 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Danilo
Top achievements
Rank 1
Danilo asked on 02 May 2016, 01:36 PM

Hello everyone

I'm facing a problem with RadMaskedEditBox control in UI for WinForms. I'm not able to paste a copied text into the control. Even if I set MaskType to None, I'm not able to paste some text. The first time I can paste some text, but then nothing more. Example:

I first copy a text like e.g. "hello" and paste it to the RadMaskedEditBox. This works. If I want to paste it then again, it doesn't work anymore. Step by step:

1. Copy a random text using CTRL+C
2. Paste it to the RadMaskedEditBox control using CTRL+V (works)
3. Try to paste it again using CTRL+V (doesn't work anymore).

I noticed that pasting a text always works if the user selects the whole text which is already in the box (like "overwrite" the existing text). But it's not possible to paste a text to the end of an existing text in the EditBox control.

Is this a known bug of this control? If yes, is there a planned bugfix?

Regards,
Danilo

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 03 May 2016, 12:33 PM
Hi Danilo,

Thank you for contacting us. 

The case where the mask type is set to None is resolved. Here are the item details:  FIX. RadMaskedEditBox - paste behavior of incorrect text according to the applied mask should be identical when the whole text is selected and when no selection is available

The fix will be available in the next official release.

Could you please specify the actual masks that you use in your application. This way I will be able to check if this is working with them as well.

Thank you in advance for your patience and cooperation. I am looking forward to your reply.

Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Danilo
Top achievements
Rank 1
answered on 03 May 2016, 01:35 PM

Hello Dimitar

Thanks for your response. I'm looking forward to this fix. Do you know when this fix will be released? In the next few days?

I'm not using any mask. I just added a new RadMaskedEditBox control to a test application and set MaskType to None with an empty Mask property.

In the main application I'll use Standard and Regex masks. Some example masks would be:

Standard:

000000 >LLLL< 0000000
000000000\/>LLL<LLL

Regex:

^[0-9]{6} [A-Z]{4} [0-9]{7}$
^[0-9]{9}[/][A-Z]{3}[a-z]{3}$

In my test application I didn't use any masks or mask types (to test it).

Regards,
Danilo

0
Accepted
Dimitar
Telerik team
answered on 04 May 2016, 09:52 AM
Hi Danilo,

Thank you for writing back.

The new version will be released later today, however only the fix for the None mask type will be available in it. It appears that you still cannot paste if the MaskType is set to Regex. I have logged this issue in our 
Feedback Portal. You can track the item for status changes and add your vote for it here.

To paste with a regex mask you can use the KeyPress event:
private void RadMaskedEditBox1_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == '\x16')
    {
        radmaskedEditBox1.MaskedEditBoxElement.TextBoxItem.Paste();
    }
}

Your Telerik Points have been updated for this report.

Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Danilo
Top achievements
Rank 1
answered on 12 May 2016, 07:01 AM

Hello Dimitar

Sorry for let you wait. I'm currently updating the library. Your workaround works for regex masks.
Thank you for your support.

Regards,
Danilo

0
Dimitar
Telerik team
answered on 12 May 2016, 07:44 AM
Hi Danilo,

I am glad I could be of help. Let us know if you have any other questions.

Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
MaskedEditBox
Asked by
Danilo
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Danilo
Top achievements
Rank 1
Share this question
or