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

RadMaskedTextInput and CharacterCasing without Mask

1 Answer 151 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Lukasz
Top achievements
Rank 1
Lukasz asked on 07 Aug 2015, 09:50 AM

Hi,

I am trying to replace TextBox that had CharacterCasing="Upper" with RadMaskedTextInput.

I do not want to have placeholders, so I cannot use Mask=">a10"

Is there any other way to change charaters to upper when typing into RadMaskedTextInput?

Thanks,

Lukasz

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Aug 2015, 12:29 PM
Hi Lukasz,

There is no out of the box way to set up uppercasing in no-masked RadMaskedTextInput.

However, you can try the following code if it is applicable at your side:
    <telerik:RadMaskedTextInput Mask=""
                                        ValueChanging="mask_ValueChanging"
                                        Width="300" x:Name="mask"/>
 
private void mask_ValueChanging(object sender, Telerik.Windows.Controls.MaskedInput.RadMaskedInputValueChangingEventArgs e)
        {
            if (e.NewValue == null)
                return;
 
            string newValue = e.NewValue.ToString();
            if (newValue.Length > 0)
            {
                newValue = newValue.ToUpper();
            }
            this.mask.ValueChanging -= this.mask_ValueChanging;
            this.mask.Value = newValue;
            this.mask.ValueChanging += this.mask_ValueChanging;
 
        }

We hope it will meet your requirements.

Regards,
Petar Mladenov
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
Lukasz
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or