Properties
RadMaskedEditBox descends from RadTextBox and so has the same properties,
methods and events. The significant properties unique to RadMaskedEditBox are:
MaskType and Mask Examples:
| MaskType | Mask | User Input | Displayed As/Example |
| Standard | \# ### | 12 | # 12_ |
| Standard | ###-##-#### | 1234 | 123-4_-____ |
| Standard | aaaaa-aaaaa-aaaaa-aaaaa | abc123 | abc12-3____-_____-_____ |
| DateTime | d | 1 1 2007 | 01/01/2007 |
| DateTime | MMM dd | Navigate with arrow keys | Dec 1 |
- Culture:
This property allows you to set the current language and culture from a drop down list at design-time
or assign a new CultureInfo instance at run-time.
Copy[C#]
this.radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.DateTime;
this.radMaskedEditBox1.Mask = "D";
this.radMaskedEditBox1.Culture = new System.Globalization.CultureInfo("de-DE");
Copy[VB.NET]
Me.RadMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.DateTime
Me.RadMaskedEditBox1.Mask = "D"
Me.RadMaskedEditBox1.Culture = New System.Globalization.CultureInfo("de-DE") - Value: This property returns user input without the formatting characters.
If you want the input and the formatting characters, use the
Text property.
- NullText - determines the text that will be displayed, when the Value of the control
is null.
Events
RadMaskedEditBox allows you to handle ValueChanging
and ValueChanged events. Examine the Text and
Value properties to determine user entry with mask and without mask, respectively.
ValueChanging also passes a CancelEventArgs parameter
containing a Cancel property. When Cancel is set to true
the value is not allowed to change.