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

RadMaskedTextBox Change Textmode OnBlur OnFocus

2 Answers 78 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 23 Nov 2015, 01:52 PM
I have a RadMaskedTextBox to accept a Social Security Number.  What I would like to do is display the field content when the field is in focus, but then change to textmode=password when not in focus.  Is this possible using javascript or another method?  Thanks.

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 24 Nov 2015, 10:16 AM
Hello Adam,

In order to hide the number when the input is not in focus you can use the DisplayMask property. The markup for the RadMaskedTextBox would look similar to the following:


<telerik:RadMaskedTextBox runat="server" ID="RadMaskedTextBox1" DisplayMask="*********" Mask="###-##-####"></telerik:RadMaskedTextBox>


Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Adam
Top achievements
Rank 1
answered on 24 Nov 2015, 02:40 PM
Works perfectly, thank you.
Tags
MaskedTextBox
Asked by
Adam
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Adam
Top achievements
Rank 1
Share this question
or