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

Unexpected behavior removing underscore when using plain text mode

1 Answer 301 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Ross
Top achievements
Rank 2
Iron
Ross asked on 04 Sep 2014, 04:47 AM
Just thought I would add a note because I have not been able to see this behaviour documented elsewhere.

When using

<telerik:RadMaskedTextInput Mask="" TextMode="PlainText"/>

adding the text a_b changes to ab when navigated away from. The fix is to use MaskedText as the textmode instead which is the default so it would be
<telerik:RadMaskedTextInput Mask="" TextMode="MaskedText"/>
or simply
<telerik:RadMaskedTextInput Mask=""/>

Hope this helps anyone else with the same issue

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 05 Sep 2014, 12:21 PM
Hi Ross,

This behavior is expected. When you lost the focus from RadMaskedTextInput you see the value of its Text property. The way the Text property is set from the combination of the Value and the Mask properties is controlled by the TextMode property.

When the TextMode is set to Masked input the control's Text value represents the formatted Value including the placeholder characters. If the property is set to PlainText the Text contains the formatted Value but without the placeholder characters. The default placeholder of the masked input control is an underscore character (_).

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Ross
Top achievements
Rank 2
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or