RadMaskedTextBox Change Textmode OnBlur OnFocus

3 posts, 0 answers
  1. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2014

    Posted 23 Nov 2015 Link to this post

    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. Viktor Tachev
    Viktor Tachev avatar
    1786 posts

    Posted 24 Nov 2015 Link to this post

    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>

    Viktor Tachev
    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
  3. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2014

    Posted 24 Nov 2015 in reply to Viktor Tachev Link to this post

    Works perfectly, thank you.
Back to Top