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

MaskedTextBox - Hide enumeration character

2 Answers 128 Views
Input
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 28 Jan 2013, 01:58 PM
Hi, 

I have following masked textbox =>

<telerik:RadMaskedTextBox id="txtFlightNumber" runat="server" width="70px" SelectionOnFocus="SelectAll"
    Mask="<C|D|E>L ####<E|F>"  />

Mask works correctly and allow me to insert either C, D or E, but when the control is loaded, it displayes "C_ ____E" . What attribute should I set to hide those enumeration characters ? I want to display empty control. I tried EmptyMessage, DisplayMask and nothing worked. Maybe I used it wrong way... 

And there is also another thing... When those characters are displayed, during gathering the data I get txtFlightNumber.Text = "CE", but user didn't insert any data there... I want to get empty message...

Do you have any idea?

Thanks in advance

Peter

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Jan 2013, 07:17 AM
Hi Peter,

I suppose you want to hide the enumeration characters on pageLoad and on its focus it should show the characters...
Try seting DisplayMask with a space in it and it should work.
<telerik:RadMaskedTextBox ID="txtFlightNumber" runat="server" Width="70px" SelectionOnFocus="SelectAll"
 DisplayMask="  " Mask="<C|D|E>L ####<E|F>" />

Thanks,
Princy.
0
Peter
Top achievements
Rank 1
answered on 29 Jan 2013, 01:40 PM
Thanks for the advice, but even when I type some input there and leaving the control nothing stayed displayed.

It worked when I set  AllowEmptyEnumerations="true"
Tags
Input
Asked by
Peter
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Peter
Top achievements
Rank 1
Share this question
or