
Cristian Apavaloaiei
Top achievements
Rank 2
Cristian Apavaloaiei
asked on 07 Oct 2010, 12:38 PM
I need a masked text box that can accept only IBAN values. The value is of type ROkk BBBB CCCC CCCC CCCC CCCC where kk are digits, BBBB must be uppercase letters and C must be uppercase letters or numbers. Is there any way to achieve this mask using RadMaskedTextBox?
5 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 07 Oct 2010, 01:57 PM
Hello,
I hope the following approach will help you to achieve the required.
ASPX:
CSS:
-Shinu.
I hope the following approach will help you to achieve the required.
ASPX:
<
telerik:RadMaskedTextBox
CssClass
=
"upper"
ID
=
"RadMaskedTextBox3"
runat
=
"server"
Mask
=
"RO## LLLL aaaa aaaa aaaa aaaa"
DisplayMask
=
"RO## LLLL aaaa aaaa aaaa aaaa"
>
</
telerik:RadMaskedTextBox
>
CSS:
<style type=
"text/css"
>
.upper
{
text-transform
:
uppercase
;
}
</style>
-Shinu.
0

Cristian Apavaloaiei
Top achievements
Rank 2
answered on 07 Oct 2010, 02:31 PM
Thanks, but it doesn't solve my problem completely. This is actually the solution i found for now, but it's not perfect because 'a' masks allow users to type in anything, so for example ~!@#$%^&*()_+ are all valid characters according to the mask.
0

Cori
Top achievements
Rank 2
answered on 07 Oct 2010, 02:41 PM
Hello Cristian,
You can refer to this documentation topic on how to build masks:
http://www.telerik.com/help/aspnet-ajax/input_radmaskedtextboxmasks.html
The uppercase mask is L. For uppercase and numbers I'm assuming if you add <L|#>, in the place of each a in the mask Shinu offered, it should only allow them to select an uppercase letter or number. So something like this:
RO## LLLL <L|#><L|#><L|#><L|#> <L|#><L|#><L|#><L|#> <L|#><L|#><L|#><L|#> <L|#><L|#><L|#><L|#>
I hope that helps.
You can refer to this documentation topic on how to build masks:
http://www.telerik.com/help/aspnet-ajax/input_radmaskedtextboxmasks.html
The uppercase mask is L. For uppercase and numbers I'm assuming if you add <L|#>, in the place of each a in the mask Shinu offered, it should only allow them to select an uppercase letter or number. So something like this:
RO## LLLL <L|#><L|#><L|#><L|#> <L|#><L|#><L|#><L|#> <L|#><L|#><L|#><L|#> <L|#><L|#><L|#><L|#>
I hope that helps.
0

Cristian Apavaloaiei
Top achievements
Rank 2
answered on 07 Oct 2010, 02:55 PM
Unfortunately, i can't set that kind of mask, <L|#> translates as "allow only the L and # characters". The only option i see is <A|B|C...Z|1|2...9> but there should be an easier way to implement this.
0

Cori
Top achievements
Rank 2
answered on 07 Oct 2010, 06:37 PM
I guess listing all the letters is the only to go, since I have no clue why it doesn't accept the L as being a capital letter when used in an Enumeration.