RadMaskedTextBox doesn't aligns properly - phone number

13 posts, 0 answers
  1. David
    David avatar
    2 posts
    Member since:
    Jul 2008

    Posted 04 Jul 2008 Link to this post

    Hi,

    I'm working with the RadMaskedTextBox to input telephone numbers with ext.
    The problem that I have is when my phone number doesn't have a extension the value of the control is right aligned. 

    Here are my lines : 

    <telerik:RadMaskedTextBox ID="rmtbTel" runat="server" Width="103px"  Skin="Default2006" DisplayFormatPosition="left" DisplayMask="###.###.####x#####" Mask="###############" Enabled="False">
    </telerik:RadMaskedTextBox>

    I'm using ASP.NET AJAX Q1 2008 SP2 (Version Number 2008.1.619):.

    Thanks for helping,

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 07 Jul 2008 Link to this post

    Hi David,

    Please try to set the NumericRangeAlign="Left" for the MaskedTextBox . Test this property setting and let us know if this helps.

    Best regards,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    2 posts
    Member since:
    Jul 2008

    Posted 07 Jul 2008 Link to this post

    It's still not working. Here are my lines :

    <telerik:RadMaskedTextBox ID="rmtbTel" runat="server" Width="103px" Skin="Default2006" DisplayMask="###.###.####x#####" Mask="###############" NumericRangeAlign="left" Enabled="False"> </telerik:RadMaskedTextBox>

    The NumericRangeAlign="left" has not changed the way where the digits are displayed for my phone number. The 9 digits (123.456.7890) are still going on the right side of my textbox where is located my extension part.

    Any other ideas ??

    Dave

  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 08 Jul 2008 Link to this post

    Hello David,

    It seems that the presented issue is a bug of the RadMaskedTextBox. I will forward this problem to our developers so they will further research on its future fixing.
    Thank you for bringing this to our attention.

    Regards,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Jeremy Wadsworth
    Jeremy Wadsworth avatar
    41 posts
    Member since:
    Mar 2006

    Posted 22 Mar 2009 Link to this post

    It appears this issue has not been resolved. I'm using Q1 2009 ASP.NET AJAX. I have the following code:

                            <telerik:RadMaskedTextBox ID="PhoneNumber" runat="server"  
                                Width="150px"  
                                Text='<%# Eval("PhoneNumber") %>'  
                                Mask="(###) ###-#### x#####"  
                                DisplayMask="(###) ###-#### x#####"  
                                NumericRangeAlign="Left"
                            </telerik:RadMaskedTextBox> 

    When the focus is in the textbox, the phone number with no extension displays fine. As soon as the textbox loses focus, all the numbers shift to the right and it looks like (___) __5-5555 x55555.

  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 24 Mar 2009 Link to this post

    Hi Jeremy,

    Indeed, this is the expected and intended by design behavior of RadMaskedTextBox. This way the control indicates that not the whole input is entered, that not the whole mask is covered.
    You can check it out here

    Kind regards,
    Iana
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  8. Kenyon Fox
    Kenyon Fox avatar
    9 posts
    Member since:
    Nov 2005

    Posted 24 Mar 2009 Link to this post

    I think the point of this original post has been lost in translation...let's see if I can't clear things up a little because I am encountering the same situation.

    I believe what Jeremy is getting at is that he wants to have a masked textbox that will capture a telephone number with an optional extension...meaning the user can enter a telephone number with or without an extension.  The way he has it confirgured currently...
                                    
                            <telerik:RadMaskedTextBox ID="PhoneNumber" runat="server"  
                                Width="150px"  
                                Text='<%# Eval("PhoneNumber") %>'  
                                Mask="(###) ###-#### x#####"  
                                DisplayMask="(###) ###-#### x#####"  
                                NumericRangeAlign="Left"
                            </telerik:RadMaskedTextBox>

    This configuration basically requires that the user enter an extension of exactly 5 numbers.  My question (and I think Jeremy's question as well) is how do we configure the masked textbox to have the extension part of the mask be optional?

    So if the user enters an extension, the result will look like ... (555) 555-5555 x55555 and if the user does not enter an extension the result would look like ... (555) 555-5555 x_____

    Hopefully that make's better sense.  I can see this being a common scenario with phone numbers, zip codes, addresses, etc...

    Regards,
    Kenyon
  9. Jeremy Wadsworth
    Jeremy Wadsworth avatar
    41 posts
    Member since:
    Mar 2006

    Posted 24 Mar 2009 Link to this post

    Thank you Kenyon, you explained it exactly.
  10. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 26 Mar 2009 Link to this post

    Hi Jeremy and Kenyon,

    Thank you, Kenyon, for your detailed explanation. Now I was able to observer the undesired behavior. But unfortunately this is the way RadMaskedTextBox is made to work. However, I will need to further check if that could be changed or if I can provide you a workaround.
    I will write back here for al interested.

    Sincerely yours,
    Iana
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  11. Jeremy Wadsworth
    Jeremy Wadsworth avatar
    41 posts
    Member since:
    Mar 2006

    Posted 13 Jun 2009 Link to this post

    HI. I'm still hoping for a work around for this issue. Is there any way to get those numbers to shift to the left, or not shift to the right after the textbox loses focus?

    Thanks,

    Jeremy
  12. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 15 Jun 2009 Link to this post

    Hello Jeremy,

    Could you please try updating to the latest version of the controls and see if the issue persists there?

    Let me know how it goes.

    Kind regards,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  13. Jeremy Wadsworth
    Jeremy Wadsworth avatar
    41 posts
    Member since:
    Mar 2006

    Posted 15 Jun 2009 Link to this post

    Thank. It seems to be working after removing the DisplayMask. For clarity for everyone else.

    This causes the issue.
    <telerik:RadMaskedTextBox ID="PhoneNumber" runat="server"   
        Width="120"   
        Mask="(###) ###-#### ext.#####"   
        DisplayMask="(###) ###-#### ext.#####">  
    </telerik:RadMaskedTextBox> 

    This works great.
    <telerik:RadMaskedTextBox ID="PhoneNumber" runat="server"   
        Width="120"   
        Mask="(###) ###-#### ext.#####">  
    </telerik:RadMaskedTextBox> 
  14. JB
    JB avatar
    1 posts
    Member since:
    Feb 2011

    Posted 23 Feb 2011 Link to this post

    sorry wrong forum....
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017