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

RadMaskedTextInput truncates last character on fast key type on enter key at last

0 Answers 33 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rakesh
Top achievements
Rank 1
Rakesh asked on 21 Mar 2013, 03:26 PM
I found a bug in RadMaskedTextInput.
My user enters securities(i.e MSFT, NFLX) very fast in textinput and clicks enter which i am handling keyup event.

Here I am making Placeholder=" " because i dont want anything mask in the textinput.
try to enter text very fast and click enter.
1) considering no key up
     you can notice the last character gets truncated.
2) handling key up as below code
    you get all the text entered but you can see strange behavior when you try to delete it using delete key.


<telerik:RadMaskedTextInput x:Name="xText1"
                             Width="150"
                             Height="25"
                             Placeholder=" "
                              Margin="5"
                              TextMode="PlainText"
                             KeyUp="xText1_KeyUp"/>
private void xText1_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
       {
           if(e.Key == Key.Enter)
           {
               xText1.Focus();
               Dispatcher.BeginInvoke(() =>
               {
                   xText1.Value = xText1.Value.ToUpper();
                   xText1.SelectionStart = xText1.Value.Count();
 
               });
           }
       }

If you need any further information please let me know.


Thanks
Rakesh


No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Rakesh
Top achievements
Rank 1
Share this question
or