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

Bug with negative values

1 Answer 90 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Fabien
Top achievements
Rank 2
Fabien asked on 18 Dec 2008, 09:16 AM
Hi,

I found a bug with negative values.

Parameters are :
            //  
            // RadMaskedEditBox_Test 
            //  
            this.RadMaskedEditBox_Test.Culture = null
            this.RadMaskedEditBox_Test.EnableKeyMap = true
            this.RadMaskedEditBox_Test.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(20)))), ((int)(((byte)(107))))); 
            this.RadMaskedEditBox_Test.Location = new System.Drawing.Point(205, 10); 
            this.RadMaskedEditBox_Test.Mask = "N1"
            this.RadMaskedEditBox_Test.MaskType = Telerik.WinControls.UI.MaskType.Numeric; 
            this.RadMaskedEditBox_Test.Name = "RadMaskedEditBox_Test"
            this.RadMaskedEditBox_Test.PlaceHolder = ' '; 
            this.RadMaskedEditBox_Test.RightToLeft = System.Windows.Forms.RightToLeft.Yes; 
            //  
            //  
            //  
            this.RadMaskedEditBox_Test.RootElement.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(20)))), ((int)(((byte)(107))))); 
            this.RadMaskedEditBox_Test.Size = new System.Drawing.Size(40, 20); 
            this.RadMaskedEditBox_Test.TabIndex = 23; 
            this.RadMaskedEditBox_Test.Text = "0.0"
            this.RadMaskedEditBox_Test.Value = "0"



event :
        #region Patches for Telerik 
        /// <summary> 
        /// Max length control 
        /// </summary> 
        private void RadMaskedEditBox_Test_KeyPress(object sender, KeyPressEventArgs e) 
        { 
            if (this.RadMaskedEditBox_Test.Text.Length == 5) 
                e.Handled = true
        } 
        #endregion 



Now, just try to set -10.0 on the control.

You'll see that you have 10.0 on Value and -10.0 on Text (normal :p)


I know that's possible to get the value from the text, but for me it's not a "normal" situation.

Best regards


1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 19 Dec 2008, 03:46 PM
Hi Fabien,

Thank you for writing.

I confirm that the described issue is present in RadMaskedEditBox. We will try to address it for the upcoming releases. I have updated your Telerik points for reporting this.

If you have other questions, do not hesitate to contact me again.

 
Best wishes,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
MaskedEditBox
Asked by
Fabien
Top achievements
Rank 2
Answers by
Martin Vasilev
Telerik team
Share this question
or