Declined
Last Updated: 16 Mar 2016 19:33 by Rousseau
ADMIN
Pavel R. Pavlov
Created on: 17 Jan 2014 13:41
Category: MaskedInput
Type: Feature Request
11
Pasting in MaskedTextInput should work like in TextBox
Currently, performing consecutively paste operation does not work like in TextBox. In TextBox the strings are concatenated but in MaskedTextInput the caret is in the beggining and only the first paste is successful. 
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
9 comments
Rousseau
Posted on: 16 Mar 2016 19:33
I am using Q1 2014. Is that the problem? Which version Mask="" works?
ADMIN
Petar Mladenov
Posted on: 16 Mar 2016 07:49
Hi Rousseau,

Could you please open a support thread in our system describing what stops you from using no-mask (Mask="") where the consecutive paste is working out of the box ?

This way we will be able to provide a suitable solution for you faster. Thank you for your understanding.
Rousseau
Posted on: 16 Mar 2016 00:21
The given alternative did not work. The SelectionStart coming most of the time greater than the length value of the text.

Does anyone else have a working alternative This is really bad if we cannot support existing/default behavior of an input control.
ADMIN
Petar Mladenov
Posted on: 20 Apr 2015 08:49
Consecutive Paste operation works in No-Masked scenario (Set Mask=""). Changing the paste behavior in masked scenarios would be a breaking change for some of our clients. We are closing this feature request.
Pavel
Posted on: 22 Jan 2015 11:30
This issue must be fixed! It's base functionality that works everywhere, but not in Telerik masked input.
Andrew
Posted on: 05 Nov 2014 14:52
We would really like this functionality as well.
Jannik
Posted on: 18 Jul 2014 08:00
Bump - This really needs to be developed.
ADMIN
Petar Mladenov
Posted on: 28 Mar 2014 12:19
Hi Demir,

The issue is still not scheduled.

However, you can workaround it by inheriting RadMaskedTextInput and override HandlePaste method:

  public class CustomTextInput : RadMaskedTextInput
    {
        protected override void HandlePaste()
        {
            string txt = Clipboard.GetText();
            this.Value += txt;            
        }        
    }
Of course in this method you must also include border cases and the SelectionStart (the position of the caret).
Additionally, because this method fires twice, you can remove the binding to ApplicationCommands.Paste like so:

  private void input_Loaded(object sender, RoutedEventArgs e)
        {
            TextBox tBox = (sender as RadMaskedInputBase).ChildrenOfType<TextBox>().FirstOrDefault();
            if (tBox != null)
            {
                tBox.CommandBindings.Clear();
            }
        }

We hope this could be a good starting point for a workaround.
B
Posted on: 27 Mar 2014 15:55
Hi,
Is there any progress on this? Or a better workaround?

The workaround of pasting the text to be copied in notepad, copying the old text from the destination RadMaskedTextInput to notepad too, cutting the text to be copied, pasting it somewhere, copying the entire text, pasting it back in the RadMaskedTextInput is cumbersome and errorprone.

Regards,
Bayram