It seems that the RadMaskedEditBox allways works in replace mode.What I want to do is the following:
On the Enter-Event I select the whole contents of the control. When the user types the first character, the old contents should be replaced by the character he typed. But that doesn't happen. Instead the first character is replaced by the user input. If the former content had 4 characters and the user only types 2 characters the rest of the old input remains in the control.
Sometimes replacement starts on the second character, although the whole content was selected.
Is there a way to replace the old content completely when the user types the first character?
5 Answers, 1 is accepted
Thank you for writing.
RadMaskedEditBox always restricts user to type only the allowed characters that fits to the mask pattern and for many masks we cannot clear the initial/pattern value - for example for mask n3 (0.00) we always have two zeros after the decimal sign or for DateTime mask we always have an initial Date that cannot be removed.
Do not hesitate to contact us if you have other questions.
the Telerik team
Thank you for the explanation.
So I've to find a workaround, because the EditBox's I'm talking about allow only simple string input. No decimals or something special formatted.
Thank you for the feedback.
In this case I would like to suggest using the regular RadTextBox for simple text editing or continue using RadMaskedEditBox, but set the Mask property to None.
You should also subscribe to the Enter event and on this event select whole text, for example:
I hope this helps.
All the best,
the Telerik team
1. Clear all RMEB fields by setting the RMEB.MaskedEditBoxElement.TextBoxItem to ""
2. Check for Null date and only populate control if Date field value IsNot Null
If you set the ctl.text for a Date mask RMEB to Null, today's date will be filled in. So check for null and don't set it if null.
Thank you for sharing your solution with our community.
Your Telerik points have been updated accordingly.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.