Migration from RadMaskedTextBox
How to migrate from the RadMaskedTextBox to the RadMaskedInput
The RadMaskedTextBox component is obsolete and will be removed with the Q2 2014 release. The component had many known limitations which drove us to the decision to create a suite of 4 MaskedInput components that further enhance the user experience when working with controlled data input. The suite includes RadMaskedTextInput, RadMaskedCurrencyInput, RadMaskedNumericInput and RadMaskedDateTimeInput controls. They all share common functionality but each one is designed to handle specific type of input. This way we managed to cover a broader set of requirements in the controls related mostly to the specifics of each type of value input:
|RadMaskedInput Component||Value type|
This is why we strongly encourage all existing and new customers to use the RadMaskedInput suite of controls instead.
The API of all RadMaskedInput components closely mirrors the RadMaskedTextBox API which makes the migration between the old and the new components straight-forward. However, it is important to note that the MaskedTextBox MaskType property is not available within the MaskedInput components as instead each component represents a specific type of input. You can use the information below to choose a RadMaskedInput component based on the current MaskType of your RadMaskedTextBox:
MaskType=”Standard” - Choose between RadMaskedTextInput, RadMaskedNumericInput and RadMaskedCurrencyinput based on the type of input you need to provide for your users: numeric, currency or string.
MaskType=”DateTime” - Use a RadMaskedDateTimeInput.
MaskType=”None” - Use the NoMask functionality of the RadMaskedTextInput, RadMaskedNumericInput and RadMaskedCurrencyinput and choose the component based on the type of input you need to provide for your users: numeric, currency or string.
The other API changes are listed in the table below:
|MaxLength||Use the MaskedInputExtensions MaskedInputExtensions.Maximum for RadMaskedNumericInput and RadMaskedCurrencyInput MaskedInputExtensions.MaxTextLength for RadMaskedTextInput|
|IsEmpty||You can check if the Value property of a MaskedInput component equals null to see if the component is empty.|
At the same time in the RadMaskedInput components you will find a more extensive set of features further demonstrated in the examples available within the UI for Silverlight demo application.