Completed
Last Updated: 25 Apr 2016 06:29 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 09 Oct 2013 01:47
Category: Editors
Type: Bug Report
0
FIX. RadMaskedEditBox - exception has been thrown when accessing the value
To reproduce: use the following code:
public Form1()
{
    InitializeComponent();
    
    RadMaskedEditBox maskControl = new RadMaskedEditBox();
    maskControl.TextMaskFormat = System.Windows.Forms.MaskFormat.ExcludePromptAndLiterals;
    CultureInfo ci = CultureInfo.CreateSpecificCulture(Thread.CurrentThread.CurrentCulture.Name);
    ci.NumberFormat.NumberGroupSeparator = "";
    maskControl.Culture = ci;
    maskControl.Text = "2";
    object o = maskControl.Value;  //Exception!! 
    this.Controls.Add(maskControl);
}

Workaround:
Do not set NumberGroupSeparator to String.Empty when TextMaskFormat=ExcludePromptAndLiterals
0 comments