RadMaskedTextBox Copy/Paste Issue in IE7

12 posts, 0 answers
  1. jai
    jai avatar
    16 posts
    Member since:
    Jan 2008

    Posted 23 May 2008 Link to this post

    Hi

    Im using RadMaskedTextBox for phone input in my project, in that im facing issue like copy/paste is not working with IE browser and its fine Mozilla. Need to add any additional stuff to overcome this? help me to solve this problem.

    <telerik:RadMaskedTextBox ID="txtOrgFax" Mask="(###) ###-####" PromptChar=" " runat="server">                                       </telerik:RadMaskedTextBox>

    looking for ur response

    Regards
    Jai.
  2. Cedric
    Cedric avatar
    15 posts
    Member since:
    Apr 2008

    Posted 02 Jun 2008 Link to this post

    I have the same problem, but no one seem to respond....


    I've the same problem with the telerik demo, the RadMaskedTextBox do not allow me to paste contain in the field.

    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Input/Examples/Common/CopyPaste/DefaultCS.aspx
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 03 Jun 2008 Link to this post

    Hi Cedric,

    I believe the issue has been fixed in the latest version of the control. You can upgrade to the latest version, to take care of the issue.

    Greetings,
    Yavor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Cedric
    Cedric avatar
    15 posts
    Member since:
    Apr 2008

    Posted 03 Jun 2008 Link to this post

    I use the last version and it do not work properly. Test it by your own, add this to a page:

    <

    telerik:RadMaskedTextBox runat="server" ID="RadTest" Mask="aaaaa-aaaaa" />

    and with IE7 try to paste this code : EJ4L7-N3LH7

    nothing happen but if you try it in firefox, it will work....

  6. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 04 Jun 2008 Link to this post

    Hi Cedric,

    Unfortunately you are right and this is a bug with our MaskedTextBox under IE. I have notified our developers and hopefully they will fix it for the next release of the controls. Please excuse us for this temporary inconvenience.

    Greetings,
    Pavel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Troy
    Troy avatar
    3 posts
    Member since:
    Jul 2008

    Posted 23 Jul 2008 Link to this post

    telerick,

    I believe I am now dealing with a situation similar that described in this thread, and I am wondering if this bug has been resolved yet? If so, I will update to the most recent version.

    In case it is important, I will also describe my problem. If you feel my problem is not close enough related to the topic of this thread, I will happily start a new thread for this situation.

    I am using a RadMaskedTextBox and am applying an international phone number mask to it: 

    "#### (####) ############ ext. #####"

    This mask is working great, and the values are being stored into the database correctly.

    However, we are also giving the user the option of editing this phone number, and we are also applying this mask to the edit template. Thus, both the edit and standard templates produce phone number fields that look like:

    "____ (____) ____________ ext. _____" 

    The problem we are facing is, if the user does not enter any numbers at all in the first portion of the mask, before the parenthesis, like this for example:

    "____ (1___) ____________ ext. _____" 

    ...in this case, the value of "(1) ext. " is stored in the database, which is fine, but then, if the user goes to edit the phone number field the "(1) ext. " is being applied again to the mask before it is displayed in the edit template, and the result is an empty field that looks like nothing had ever been entered into it, like this:

    "____ (____) ____________ ext. _____" 

    ...My guess is that this is happening because "(1) ext. " does not match up will with the mask with the parenthesis being the first character in the string, but with the mask expecting a number as the first character.

    So, if I described this scenario well enough for it to be understood, is there anything else I can do to address this, or is it part of the bug mentioned above? If it is part of the bug, has it been addressed yet? 
  8. Troy
    Troy avatar
    3 posts
    Member since:
    Jul 2008

    Posted 23 Jul 2008 Link to this post

    In case this is helpful for anyone else, I resolved the above described problem with the following code:

    1 private string EnforcePhoneNumberMask(string strMask, string strStringToMask)  
    2 {  
    3     // We had a problem in which the mask was not working with a mask of "#### (####) ############ ext. #####"  
    4     // The problem was, if the first 4 characters to the left of first paren (indicated with a # in the mask)   
    5     // were not populated while the number field was being edited. In order to resolve this, we are forced to   
    6     // right-pad all empty spaces with underscores.  
    7  
    8     bool blnNumericTest;  
    9     int i, diff, intNumericTest;  
    10  
    11     string strCharToTryParse, tempStringValue = strStringToMask;  
    12  
    13     int nPoundIndex = strMask.IndexOf("#");  
    14     while ((nPoundIndex != -1))  
    15     {  
    16         if (nPoundIndex > (tempStringValue.Length - 1))  
    17         {  
    18             diff = (strMask.Length - tempStringValue.Length);  
    19  
    20             for (i = 0; i < diff; i++)  
    21             {  
    22                 tempStringValuetempStringValue = tempStringValue.Insert(nPoundIndex, "_");  
    23             }  
    24         }  
    25         else  
    26         {  
    27             strCharToTryParse = tempStringValue.Substring(nPoundIndex, 1);  
    28  
    29             blnNumericTest = int.TryParse(strCharToTryParse, out intNumericTest);  
    30  
    31             if (!blnNumericTest)  
    32             {  
    33                 tempStringValuetempStringValue = tempStringValue.Insert(nPoundIndex, "_");  
    34             }  
    35         }  
    36  
    37         nPoundIndex = strMask.IndexOf("#", nPoundIndex + 1);  
    38     }  
    39  
    40     return tempStringValue;  
    41

  9. Troy
    Troy avatar
    3 posts
    Member since:
    Jul 2008

    Posted 23 Jul 2008 Link to this post

    Small update to the code I posted previously...

    1 private string EnforcePhoneNumberMask(string strMask, string strStringToMask)  
    2 {  
    3     // We had a problem in which the mask was not working with a mask of "#### (####) ############ ext. #####"  
    4     // The problem was, if the first 4 characters to the left of first paren (indicated with a # in the mask)   
    5     // were not populated while the number field was being edited. In order to resolve this, we are forced to   
    6     // right-pad all empty spaces with underscores.  
    7  
    8     bool blnNumericTest;  
    9     int i, diff, intNumericTest;  
    10  
    11     string strCharToTryParse, tempStringValue = strStringToMask;  
    12  
    13     int nPoundIndex = strMask.IndexOf("#");  
    14     while ((nPoundIndex != -1))  
    15     {  
    16         if (nPoundIndex > (tempStringValue.Length - 1))  
    17         {  
    18             diff = (strMask.Length - tempStringValue.Length);  
    19  
    20             for (i = 0; i < diff; i++)  
    21             {  
    22                 tempStringValuetempStringValue = tempStringValue.Insert(nPoundIndex, "_");  
    23             }  
    24  
    25             return tempStringValue;  
    26         }  
    27         else  
    28         {  
    29             strCharToTryParse = tempStringValue.Substring(nPoundIndex, 1);  
    30  
    31             blnNumericTest = int.TryParse(strCharToTryParse, out intNumericTest);  
    32  
    33             if (!blnNumericTest)  
    34             {  
    35                 tempStringValuetempStringValue = tempStringValue.Insert(nPoundIndex, "_");  
    36             }  
    37         }  
    38  
    39         nPoundIndex = strMask.IndexOf("#", nPoundIndex + 1);  
    40     }  
    41  
    42     return tempStringValue;  
    43
  10. Nitin
    Nitin avatar
    5 posts
    Member since:
    Aug 2012

    Posted 18 Oct 2012 Link to this post

    Hi,
    I can still see this problem, Just to ask Telerik Team have you fixed this issue in any version?
  11. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 18 Oct 2012 Link to this post

    Hi Nitin,

    I just tested it with the latest version and it is working correctly on my end.

    Greetings,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  12. Nitin
    Nitin avatar
    5 posts
    Member since:
    Aug 2012

    Posted 18 Oct 2012 Link to this post

    Hi,
    I am using IE9, and when I press Control+X to cut and Control+V to paste it is working fine but when I click on the control and do mouse right click and do cut and paste it is not working.

    I tested this is your Demo website:

    http://demos.telerik.com/aspnet-ajax/input/examples/radmaskedtextbox/firstlook/defaultcs.aspx
  13. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 18 Oct 2012 Link to this post

    Hello Nitin,

    I see the issue, it happens only when cutting and pasting to the same input without bluing it. We will investigate it further.

    Kind regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017