Hi Martin,
Let me try to elaborate a bit more on our decision for creating the new suite of
MaskedInput controls. The
RadMaskedTextBox control works mostly with string types but there were many issues caused by the implementation of the control:
- there are numeric/currency masks which cause unexpected behavior - exceptions, incorrectly parsed value or binding issues in the
MaskedTextBox control
- the
RadMaskedTextBox doesn't support null values
- the
RadMaskedTextBox doesn't support
RegEx and the customer demand for that feature was very high
- there are issues with editing
DateTime values
- the
RadMaskedTextBox can't work correctly with all cultures
- the spinning behavior causes exceptions in certain scenarios
Based on our customers feedback and the growing list of issues we decided that it would be best to create a new implementation of the control. But as a
MaskedInput control should work for many different inputs and apply different and very specific restrictions to each type of input, we decided to create a separate control for each type of input. This allowed us to cover most of the scenarios demanded by our customers.
And as we want to make sure that you can use the
MaskedInput controls instead of the
RadMaskedTextBox control to implement your requirements, your feedback is highly appreciated. Also, I want to assure you that we won't remove the
RadMaskedTextBox control from our suite before making sure that our customers can replace it with the
MaskedInput controls without compromising the behavior of their applications.
As for your scenarios, you are right that the
MaskedInput controls allow a limited number if input characters but you can control the max number of characters and you can set a large number. For example "a99" - will create a
MaskedTextInput that would allow entering up to 99 not required alphanumeric characters. And if the number is big-enough the user won't be able to fill it and it would work as per your requirements. Do you think that can work for you or am I missing something?
Also, the
Value property of all
MaskedInput controls keeps the value entered in the control without the formatting characters. However all controls expose a
Text property which can represent the formatted
Value including the placeholder characters or the formatted
Value but without the placeholder characters. You can control the way the
Text property is created through the
TextMode property (
read more). Moreover the
Text property supports data binding so that you can use it to keep the formatted value in your database/business objects. In your case the
Text property will keep the value and the empty positions in the
MaskedInput control. And those empty positions in the
Text property will be represented by the
Placeholder character.
The
MaskedInput controls also allow you to create custom tokens and define your own valid input - our documentation can give you a better overview of the main features and properties of the
MaskedInput controls as well as a description of
this scenario. And if you encounter an issue or a scenario that you need help with, just let us know and we will do our best to provide a solution.
Kind regards,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license!
Book your seat now >>