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

RadMaskedTextBox multi-language

1 Answer 67 Views
Input
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 10 Apr 2009, 09:57 AM
Greeting!

I was tryign to implement RadInput controls to form (due to large amount of simple validations specific for every control) and found that RadMaskedTextBox is made only for engl-lang developmens, while i need to implement Rus mask.

If there any possibilities or solutions to make it? Or mask will stay there with ASCII [page:0] only and no possible utf-8 implementations can be done?

1 Answer, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 14 Apr 2009, 06:21 AM
Hello Alexander,

I am afraid that this scenario is not supported out-of-the-box since the MaskedTextBox allows the input of all types of letters. You can prevent the typing of English letters with the following script executed on the OnKeyPress client-side event handler of the control:
<script type="text/javascript"
    function KeyPress(sender, args) 
    { 
        var keyCode = args.get_keyCode(); 
        if ((keyCode >= 65 && keyCode <= 90) || (keyCode >= 97 && keyCode <= 122)) 
        { 
            sender.raise_error(args); 
            args.set_cancel(true); 
        } 
         
    } 
</script> 
<telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server"  
    Mask="llllll"
    <ClientEvents OnKeyPress="KeyPress" /> 
</telerik:RadMaskedTextBox>     

Try this and let me know if it helps.

Best wishes,
Pavel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Input
Asked by
Alexander
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Share this question
or