Completed
Last Updated: 06 Dec 2019 14:36 by ADMIN
Release R1 2020 (LIB 2019.3.1209)
Tomislav
Created on: 23 Oct 2019 11:59
Category: MaskedEditBox
Type: Bug Report
0
RadMaskedEditBox - Text property not respecting numeric mask formating on Up, Down keys

RadMaskedEditBox - (2019.3.903.40) - Text property not respecting numeric mask formatting on Up, Down keys

To repeat the bug create the RadMaskedEditBox and set the next properties:

this.radMaskedEditBox1.Mask = "N0";
this.radMaskedEditBox1.MaskType = MaskType.Numeric;

Enter the 111 in the editor. With the up/down keys set all of the values to 0.

Expected value is 0, got 000.

2 comments
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 24 Oct 2019 11:24
Hello, Tomislav,       

Following the provided information, I have prepared a sample project for your reference. Please refer to the attached zip file.

The first case with Mask="N0", note that the Value property actually stores the formatted numeric value considering the applied mask.

As to the second case with the null value and "D4" mask, I confirm that this is incorrect behavior. I have logged it in our feedback portal by approving this thread public. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

 

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to handle the MaskedEditBoxElement.TextBoxItem.TextBoxControl.PreviewKeyDown event and initialize the value if it is currently set to null:

this.radMaskedEditBox2.MaskedEditBoxElement.TextBoxItem.TextBoxControl.PreviewKeyDown+=TextBoxControl_PreviewKeyDown;

        private void TextBoxControl_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            if (this.radMaskedEditBox2.Value==null)
            {
                this.radMaskedEditBox2.Value = 0;
            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tomislav
Posted on: 23 Oct 2019 12:44

This also

this.radMaskedEditBox1.EnableNullValueInput = true;
this.radMaskedEditBox1.Mask = "D4";
this.radMaskedEditBox1.MaskType = MaskType.Numeric;
this.radMaskedEditBox1.Value = null;

Start writing 1 (the caret is where the read line is)

Then 234