Declined
Last Updated: 19 Aug 2016 15:24 by ADMIN
ADMIN
Telerik Admin
Created on: 21 Dec 2012 16:00
Category: MaskedInput
Type: Bug Report
7
MaskedInput: Minus "-" can not be removed/replaced when mask is percent type
In MaskedNumericInput when Mask="p2" you can not delete/replace the minus "-" sign when you select all and type a digit.

With no-mask, select all then typing a digit will remove the negative sign symbol from the text.

As a workaround, users can use Mask="", FormatString="p0" and maskedInput:MaskedInputExtensions.Maximum="0.99".

Second Workaround:

<telerik:RadMaskedNumericInput Mask="p2" Value="-0.25" x:Name="input" PreviewKeyDown="MaskedInput_PreviewKeyDown"/>

        private void MaskedInput_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            string keyString = e.Key.ToString();
            if (keyString.StartsWith("D") && keyString.Length == 2)
            {
                if (this.input.SelectionLength == "-AA %".Length)
                {
                    this.input.ClearCommand.Execute(null);
                }
            }
        }

Edit: Actually this is default behavior for NumericIinput with default Masks #9.2. Select All on negative value then pressing digit does not remove the negative sign.
This is the reason we will mark this bug as Declined. Please use some of the mentioned workarounds.
Please submit a support ticket via our ticketing system if this feature is critical for your business requirement.
0 comments