Basic Features
Masking the input
To mask the input, set the MaskType and Mask property as follows:
<syncfusion:SfMaskedEdit MaskType="Simple" Mask="00/00/0000" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=”00/00/0000”;
This mask expression allows only numeric inputs in the places of 0.
Setting value
Set the Value property as follows:
<syncfusion:SfMaskedEdit MaskType="Simple" Mask="00/00/0000" Value="14/11/2014" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=”00/00/0000”;
maskedEdit.Value=”14/11/2014”;
Setting prompt char
Set the PromptChar property as follows
<syncfusion:SfMaskedEdit MaskType="Simple" Mask="00/00/0000" PromptChar="*" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=”00/00/0000”;
maskedEdit.PromptChar=”*”;
By default, the prompt character is ‘_’.
Setting watermark
Set the watermark property as follows
<syncfusion:SfMaskedEdit MaskType="Simple" Mask="00/00/0000" Watermark="Mask" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Width="255" Height="46"/>
SfMaskedEdit maskededit = new SfMaskedEdit();
maskededit.MaskType=MaskType.Simple;
maskedEdit.Mask=”00/00/0000”;
maskedEdit.Watermark=”Type here”;
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page