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

MaskedImput vs MaskedTextBox

6 Answers 106 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 27 Jul 2011, 07:23 PM
What is the difference between the two controls?

6 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 01 Aug 2011, 12:13 PM
Hello Andrew,

The new MaskedInput suite of controls provides 4 different controls - MaskedDateTimeInput, MaskedTextInput, MaskedNumericInput and MaskedCurrencyInput. Each control is designed to allow a specific type of user input. We decided to provide this suite of controls due to the many known limitations in the RadMaskedTextBox control. For example, the MaskedInput controls support a null value.

Also, they further enhance the validation support by providing validation through Regular Expressions, ValidatesOnExceptions and binding validations. Furthermore, the MaskedInput controls allow you to define custom mask tokens. You can read more about the MaskedInput controls in our online documentation.

However, there are still cases in which the RadMaskedTextBox control might be a better choice. If you can describe the scenario you have, we might be able to tell you which control exactly is most suitable for you.

All the best,
Kiril Stanoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Andrew
Top achievements
Rank 1
answered on 01 Aug 2011, 12:27 PM
At this moment i was simply looking for a masked control to replace my telerik:DataFormComboBoxField inside the dateform.
The fields i have are:
Name - here i just need a watermark
Description - watermark
Units - numeric mask
Price - price mask - showing british pound sign

So not very complex.

Thanks
0
Accepted
Tina Stancheva
Telerik team
answered on 04 Aug 2011, 08:24 AM
Hi Andrew,

Thank you for getting back to us. In the described scenario the MaskedInput suite of controls is a better choice. This demo sample can help you get started. More information about the controls you can read in their online documentation.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Sergey
Top achievements
Rank 1
answered on 05 Oct 2012, 03:51 PM
I am also looking for commonality and special features on both.
Here is my case:

I am building Phone CustomControl. It has two parts related to the topic.
One is the TextBox that Visible when the (bound) Country is not US and displays free text
The other is MaskedTextBox/Input that is Visible when the Country is US and allow formatted entry like (###)###-####

They (TextBox and Masked...) bound to same property (String Phone).

The issue with MaskedTextInput (does not appear with MaskedTextBox) that
when I enter The phone "1112223333" into TextBox (not US) and then
switch country to US the MaskedTextInput overwrites Phone property with an empty Mask (  "( ___)___-____"  ).
The MaskedTextBox does not do that it takes (bound) unformatted string and displays it as "(111)222-3333"

Questions are:
1. Is there a propery on MaskedTextInput that will fix that?
2. Why should use one or the other? (MaskedTextBox vs MaskedTextInput)
0
Pavel R. Pavlov
Telerik team
answered on 10 Oct 2012, 12:14 PM
Hello Sergey,

Let us first make a quick clarification - we are now in a process of resolving the MaskedInput's main issues (that usually stop our clients upgrading from MaskedTextBox to MaskedInput) and our goal is to obsolete the RadMaskedTextBox next year.

Now straight to your issue. We tried different scenarios (changing the culture) with RadMaskedTextInput, TextBox and RadMaskedTextBox bound to the same property. It seems that the code works as expected. Please take a look of the attached project and see if it works for you. In case it is not suitable please change the project in way corresponding to your scenario.

All the best,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sergey
Top achievements
Rank 1
answered on 10 Oct 2012, 02:59 PM
Hello Pavel,

The issue I had was related to the fact (I think) that I bound MaskedTextInput.Text to the phone property. Binding to the MaskedTextInput.Value worked correctly (as in your example). Thank you.
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Andrew
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Andrew
Top achievements
Rank 1
Tina Stancheva
Telerik team
Sergey
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or