Hi,
I have a RadMaskedTextInput with both AllowInvalidValues and AcceptsReturn set to false. When user pastes a multi-line text into the control, the control accepts the multi-line text, and changes its height. Is there a way to reject the input and keep the height?
Thanks.
Gong
I have a RadMaskedTextInput with both AllowInvalidValues and AcceptsReturn set to false. When user pastes a multi-line text into the control, the control accepts the multi-line text, and changes its height. Is there a way to reject the input and keep the height?
Thanks.
Gong
4 Answers, 1 is accepted
0
Accepted
Hi Gong,
The AcceptsReturn property is designed to restrict the input of the user when (s)he actually presses the return key. If (s)he pastes any multiline text it is up to you to customize the pasted text and to control the visualization of the RadMaskedTextInput. You can do this by subscribing to the ValueChanged event of the control. In its handler you will be able to detect if there are any new lines and returns and you will be able to change the Value of the component.
Regarding your second requirement you can try setting fixed height of the control to restrict it from resizing.
Regards,
Pavel R. Pavlov
Telerik
The AcceptsReturn property is designed to restrict the input of the user when (s)he actually presses the return key. If (s)he pastes any multiline text it is up to you to customize the pasted text and to control the visualization of the RadMaskedTextInput. You can do this by subscribing to the ValueChanged event of the control. In its handler you will be able to detect if there are any new lines and returns and you will be able to change the Value of the component.
Regarding your second requirement you can try setting fixed height of the control to restrict it from resizing.
Regards,
Pavel R. Pavlov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Vadimir
Top achievements
Rank 1
answered on 27 Aug 2014, 01:53 PM
Thanks, Pavel. I implemented the ValueChanging event handler to detect the new lines.
I think it would be great to have a IsMultilineAllowed property for this control, as AcceptsReturn property is only designed to ignore the return key entered by the user.
Regards,
Gong
I think it would be great to have a IsMultilineAllowed property for this control, as AcceptsReturn property is only designed to ignore the return key entered by the user.
Regards,
Gong
0
Hello Gong,
Thank you for your feedback. Please note that you can log your suggestion as a FeatureRequest in our feedback portal.
Regards,
Pavel R. Pavlov
Telerik
Thank you for your feedback. Please note that you can log your suggestion as a FeatureRequest in our feedback portal.
Regards,
Pavel R. Pavlov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Vadimir
Top achievements
Rank 1
answered on 28 Aug 2014, 11:22 AM
Feature request is created.:)