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

3 posts, 0 answers
  1. Robert
    Robert avatar
    11 posts
    Member since:
    Jan 2008

    Posted 04 Aug 2008 Link to this post

    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. Dimo
    Admin
    Dimo avatar
    8454 posts

    Posted 05 Aug 2008 Link to this post

    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.
  3. Robert
    Robert avatar
    11 posts
    Member since:
    Jan 2008

    Posted 06 Aug 2008 Link to this post

    That did the trick.  I was missing the PromptChar attribute.

    Thanks!
Back to Top