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

How to define an all capital letters mask

3 Answers 191 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 24 Feb 2016, 01:31 PM

Hi,

I am trying to define a mask for a meskedinput control as all capital and required letters so normally I would be using something like ">LLL" as the mask.

You mention in your documentation that ">" should be escaped in XAML so I have set the mask property as ">LLL" 

<telerik:RadMaskedTextInput Name="rmb_SMS_CODE"
                HorizontalAlignment="Center"
                Margin="0,10,0,20"               
                AcceptsReturn="True"
                Mask= "&gt;LLL">
            </telerik:RadMaskedTextInput>

But this does not work, it does not even work if I define the mask in code as this.mymaskcontrol.mask = ">LLL". The control ignores the capitalisation.

Can you please provide me with some assistance on what I am doing wrong?

Thank you,

3 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 29 Feb 2016, 12:00 PM
Hi George,

Thank you for contacting us.

In order to achieve the desired behavior, you can just specify how many symbols to be required. Basically, you have to add a number after the "L" required symbol and set the AllowInvalidValues property to true. Check the code snippet below:
<telerik:RadMaskedTextInput Name="rmb_SMS_CODE"
                HorizontalAlignment="Center"
                Margin="0,10,0,20"              
                AcceptsReturn="True"
                Mask= "&gt;L3"
                AllowInvalidValues="True">
            </telerik:RadMaskedTextInput>

Give this approach a try and let us know if you have any additional questions.

Regards,
Dinko
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
George
Top achievements
Rank 1
answered on 29 Feb 2016, 01:27 PM

Thank you, that worked just fine, I suggest you include these remarks to your online documentation since it is not that clear, the control works differently with the windows forms version for example.

 

Kind Regards,

 

George

0
Dinko | Tech Support Engineer
Telerik team
answered on 03 Mar 2016, 01:12 PM
Hello George,

We appreciate any feedback given from our customers. We will update our documentation to better describe the mentioned behavior. We have also updated your Telerik points as a small appreciation for your cooperation.

Regards,
Dinko
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
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
George
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
George
Top achievements
Rank 1
Share this question
or