Whenever I type into a MaskedTextInput the words have a space. Whenever the box loses focuses the spaces are truncated and the resultant combined single phrase is left in the box. Once that box gains the focus again the phrase is broken out into its separate words again. Is there a to prevent this from happening and have it not truncate the spaces whenever the boxes don't have focus?
Also, I can't seem to get the boxes character limit past 20 some odd characters. Is there a way to increase that limit?
Thanks for any help.
Also, I can't seem to get the boxes character limit past 20 some odd characters. Is there a way to increase that limit?
Thanks for any help.
9 Answers, 1 is accepted
0
Hi Xpress,
Petar Mladenov
the Telerik team
Setting the Mask to "a40" will enable you to write 40 symbols. We are not sure we understand your first issue. Could you please send us your XAML so that we could investigate it locally and this way be better able to assist you. Thank you in advance.
Kind regards,Petar Mladenov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Xpress
Top achievements
Rank 1
answered on 24 Feb 2012, 07:53 PM
This is the code for one of my maskedtextinputs.
If I were to type the phrase "Address Line 1" into that box it would look fine. But once that input loses focus the text changes to "AddressLine1" That is not a behavior I wish to have. The only solution I can think is to just use a regular text block with validation rules since boxes like these are only validating the existence of text.
<
telerik:RadMaskedTextInput
x:Name
=
"rtiPatientAddress1"
Width
=
"175"
Margin
=
"2"
InputBehavior
=
"Replace"
UpdateValueEvent
=
"LostFocus"
SelectionOnFocus
=
"SelectAll"
Placeholder
=
" "
TextMode
=
"PlainText"
>
<
telerik:RadMaskedTextInput.Value
>
<
Binding
Path
=
"Patient.PatientAddress1"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"PropertyChanged"
NotifyOnValidationError
=
"True"
ValidatesOnExceptions
=
"True"
>
<
Binding.ValidationRules
>
<
local:NameValidation
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerik:RadMaskedTextInput.Value
>
</
telerik:RadMaskedTextInput
>
If I were to type the phrase "Address Line 1" into that box it would look fine. But once that input loses focus the text changes to "AddressLine1" That is not a behavior I wish to have. The only solution I can think is to just use a regular text block with validation rules since boxes like these are only validating the existence of text.
0
Accepted
Hello Xpress,
or
All the best,
Petar Mladenov
the Telerik team
This is expected by design since the MaskedInputControl thinks the Spaces are Placeholders when the TextMode is PlainText. So you can use one of the following scenarios:
Placeholder=" "
TextMode="MaskedText"
Placeholder="_"
TextMode="PlainText"Petar Mladenov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Alan
Top achievements
Rank 2
answered on 18 Jul 2012, 02:11 PM
I am using 2012.2.607.40 for WPF
The following XAML seems to have an issue with Select All.
It does select all for a quick second and then does a deselect.
Is there a bug?
<telerik:RadMaskedTextBox MaskType="None" SelectionOnFocus="SelectAll" />
To work around I am using:
<telerik:RadMaskedTextInput SelectionOnFocus="SelectAll" />
select all does work! but in this case I do not want the delete symbol when I hover over the control nor do I want the underlines for the input section. How can I remove these?
Thanks!
Alan
The following XAML seems to have an issue with Select All.
It does select all for a quick second and then does a deselect.
Is there a bug?
<telerik:RadMaskedTextBox MaskType="None" SelectionOnFocus="SelectAll" />
To work around I am using:
<telerik:RadMaskedTextInput SelectionOnFocus="SelectAll" />
select all does work! but in this case I do not want the delete symbol when I hover over the control nor do I want the underlines for the input section. How can I remove these?
Thanks!
Alan
0
Hi Alan,
The RadMaskedTextBox has many known limitations and this is why we usually recommend switching over to the new MaskedInput controls. This is why in your case I believe you've made the right choice. And if you don't want to have a predefined number of characters in the RadMaskedTextInput control, the latest release - Q2 2012 (v. 2012.2.0607) includes a 'no-mask' functionality. This basically means that you can define the RadMaskedTextInput control with a Mask="". This way the user will be able to enter an unlimited number of characters and the control will update its length accordingly to the user input.
You can also set the IsClearButtonVisible property of the control to False, to hide the ClearButton (read more).
Greetings,
Tina Stancheva
the Telerik team
The RadMaskedTextBox has many known limitations and this is why we usually recommend switching over to the new MaskedInput controls. This is why in your case I believe you've made the right choice. And if you don't want to have a predefined number of characters in the RadMaskedTextInput control, the latest release - Q2 2012 (v. 2012.2.0607) includes a 'no-mask' functionality. This basically means that you can define the RadMaskedTextInput control with a Mask="". This way the user will be able to enter an unlimited number of characters and the control will update its length accordingly to the user input.
You can also set the IsClearButtonVisible property of the control to False, to hide the ClearButton (read more).
Greetings,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Alan
Top achievements
Rank 2
answered on 18 Jul 2012, 04:00 PM
Thank you for the update.
Double checking invoking WPF XAML telerik:RadMaskedTextInput control with Mask="" does not allow me to enter ANY characters.
Is there a different value for that Mask property that I should use instead?
Double checking invoking WPF XAML telerik:RadMaskedTextInput control with Mask="" does not allow me to enter ANY characters.
Is there a different value for that Mask property that I should use instead?
0
Hello Alan,
Can you tell me the version of the RadControls you're using in your solution - the feature was added with the Q2 2012 release. It doesn't work in the previous versions of the controls.
I attached a sample solution demonstrating how to use the no-mask functionality in the MaskedTextInput and the MaskedNumericInput controls. Please give the solution a try and let me know if it works for you.
Regards,
Tina Stancheva
the Telerik team
Can you tell me the version of the RadControls you're using in your solution - the feature was added with the Q2 2012 release. It doesn't work in the previous versions of the controls.
I attached a sample solution demonstrating how to use the no-mask functionality in the MaskedTextInput and the MaskedNumericInput controls. Please give the solution a try and let me know if it works for you.
Regards,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Alan
Top achievements
Rank 2
answered on 18 Jul 2012, 05:47 PM
I am using the same release as your test project.
It appears there may be an issue when Mask="" and you also use the property UpdateValueEvent="LostFocus" at the same time.
When I applied UpdateValueEvent="LostFocus" to your test project it textbox remains locked.
It appears there may be an issue when Mask="" and you also use the property UpdateValueEvent="LostFocus" at the same time.
When I applied UpdateValueEvent="LostFocus" to your test project it textbox remains locked.
0
Hello Alan,
Thank you for getting back to us. You're right, I managed to reproduce the issue with these settings. However, we will need more time to investigate its cause and this is why I logged it in our PITS so that you can track the progress of the task.
I also updated your Telerik account for bringing this case to our attention.
All the best,
Tina Stancheva
the Telerik team
Thank you for getting back to us. You're right, I managed to reproduce the issue with these settings. However, we will need more time to investigate its cause and this is why I logged it in our PITS so that you can track the progress of the task.
I also updated your Telerik account for bringing this case to our attention.
All the best,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.