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,
12 Answers, 1 is accepted
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
<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
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
<telerik:RadMaskedTextBox ID="PhoneNumber" runat="server" |
Width="150px" |
Text='<%# Eval("PhoneNumber") %>' |
Mask="(###) ###-#### x#####" |
DisplayMask="(###) ###-#### x#####" |
NumericRangeAlign="Left"> |
</telerik:RadMaskedTextBox> |
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.
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
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.
Thanks,
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.
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> |