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

How do I change the default prompt character for the radmaskedtextbox?

2 Answers 260 Views
Input
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 05 Aug 2008, 03:16 AM
I'd like to change the default display prompt character for all of my masked edit text boxes to a space instead of the underscore character.  I've found that I must set a display mask as well as change the DisplayPromptChar property to a blank space. 

The only issue I'm seeing now (which isn't huge, but it would be nice to not have happen) is that when the page first renders, there are _ characters that are then removed (presumably by javascript).  Is there a way to make the edit boxes render initially with spaces instead of underscores?

Thanks!
Robert

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Aug 2008, 10:52 AM
Hi Robert,

Actually, you don't have to use the DisplayMask property in this case, it is intended for other purposes.

I think you need:

<telerik:RadMaskedTextBox  PromptChar=" " DisplayPromptChar=" "  />

If you set the DisplayMask to a sequence of spaces, you will not see the entered value when the textbox is not focused.

Let me know if I am missing something.


Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Robert
Top achievements
Rank 1
answered on 07 Aug 2008, 02:26 AM
That did the trick.  I was missing the PromptChar attribute.

Thanks!
Tags
Input
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Robert
Top achievements
Rank 1
Share this question
or