Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > Issues with delete and backspace keys

Not answered Issues with delete and backspace keys

Feed from this thread
  • Tamiko avatar

    Posted on Jan 3, 2012 (permalink)

    I'm using the following version, 2010.3.1110.1040 and have notice the following issues with the RadMaskedTextBox.

    1.  If the user selects the contents of the maskedtextbox and hits delete, nothing happens. 
    2.  The user may remove all but one character when using the backspace key.

    Any ideas would be greatly appreciated.

    private void txtArrNotice_ValueChanging(object sender, RadMaskedTextBoxValueChangingEventArgs e)
            {
                string newValue = e.NewMaskedText;
                Regex pattern = new Regex(@"(^[a-zA-Z0-9]+$)");
                e.Handled = !pattern.IsMatch(newValue);
            }
      
      
    <telerik:RadMaskedTextBox x:Name="txtArrNotice" 
               EmptyContent="Enter Arrival Notice#" 
               Style="{StaticResource ArrivalMaskedTextBoxStyle}" 
               MaskType="None" 
                ValueChanging="txtArrNotice_ValueChanging"/>

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jan 6, 2012 (permalink)

    Hi Tamiko,

     Commenting the code in the ValueChanging event handler makes the MaskTextBox work as expected. So both of your scenarios are result from you regex matching logic. Please let us know if you need further assistance.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Tamiko avatar

    Posted on Jan 6, 2012 (permalink)

    Thanks, meant to post yesterday.  I fixed it yesterday.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > Issues with delete and backspace keys
Related resources for "Issues with delete and backspace keys"

Silverlight MaskedTextBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]