Paste copied text into MaskedEditBox not working

6 posts, 1 answers
  1. Danilo
    Danilo avatar
    40 posts
    Member since:
    Sep 2012

    Posted 02 May Link to this post

    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

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 03 May Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Danilo
    Danilo avatar
    40 posts
    Member since:
    Sep 2012

    Posted 03 May in reply to Dimitar Link to this post

    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

  5. Answer
    Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 04 May Link to this post

    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.
  6. Danilo
    Danilo avatar
    40 posts
    Member since:
    Sep 2012

    Posted 12 May Link to this post

    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

  7. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 12 May Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready