Completed
Last Updated: 13 Dec 2021 11:37 by ADMIN
Release LIB 2021.3.1213 (13 Dec 2021)
Martin Ivanov
Created on: 02 Dec 2021 23:00
Category: MaskedInput
Type: Bug Report
1
MaskedInput: Non digit symbols stay in Text when all digits are deleted and UpdateValueEvent is LostFocus and non default FormatString is used in CurrencyInput/NumericInput

This is reproducible with RadMaskedNumericInput and RadMaskedCurrencyInput, when the Mask property is empty.
UpdateValueEvent is LostFocus. FormtString is non default - for example n2 or c2.
When all text is selected and delete key is pressed, the Text will become "$,." or "-." or "($)" - non digit symbols remain in text.

Expected: Text becomes empty string "".

7 comments
Scott Waye
Posted on: 07 Dec 2021 12:52
That would be amazing, thank you!
ADMIN
Petar Mladenov
Posted on: 07 Dec 2021 11:38

Hello Scott,

Thank you for the details. The FormatString setting was the one I needed in order to reproduce the issue on my side. 
I updated the portal title and description to better describe the issue you are currently facing. I'll do my best to add a fix in the next week's internal build.

Regards,
Petar Mladenov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Scott Waye
Posted on: 06 Dec 2021 19:20
HI Petar,  I'm using the attached solution, can you repro with this?
ADMIN
Petar Mladenov
Posted on: 06 Dec 2021 16:40

Hi Scott,

I was not able to reproduce the mentioned issue neither with NumericInput, nor with CurrencyInput and setting a "en-GB" culture in my WPF application as well as on the masked control. Could you please share more details from your set up - I guess XAML snapshot and regional settings snapshot should be enough. Thank you in advance.

Regards,
Petar Mladenov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Scott Waye
Posted on: 03 Dec 2021 19:49

Thanks Petar,

That's also pretty close.

However you can get the above strange result:

Press 1

Press -

Press Shift End (highlighting the everything to the right of the -

Press delete  (it shows -. )

Press -

You get the above (in the UK region at least, you might get another currency symbol I suppose if you have different regional settings)

 

 

ADMIN
Petar Mladenov
Posted on: 03 Dec 2021 15:48

Hi Scott,

I want to suggest another workaround with setting the attached property:

          <...      xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input" />
    <Grid >
        <telerik:RadMaskedNumericInput  maskedInput:MaskedInputExtensions.AllowMinusOnNullValue="True"

Basically it is designed for scenarios with empty value / text. If we change its internal code to work in your scenario (UpdateValue event LostFocus, Text is -digit, but Value is still null) the name of the property might be confusing for other users. So if you are satisfied with setting this property to True, we will probably decide to close the logged issue. Thank you in advance for your feedback.

Regards,
Petar Mladenov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Scott Waye
Posted on: 02 Dec 2021 23:15
Thanks, that's close, I notice you can't use the delete or backspace keys to delete the "-" with this workaround