Declined
Last Updated: 20 Oct 2014 14:38 by Jesse Dyck
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 19 Aug 2013 02:25
Category: Editors
Type: Bug Report
1
FIX - RadMaskedEditBox (with MaskType=Numeric and Mask = "c") is bound to a property of type decimal. Typing 15, results in 51
Description:
RadMaskedEditBox (with MaskType=Numeric and Mask = "c") is bound to a property of type decimal. If you type in 15 it goes into the maskedEditbox as 51.

Reproduce:
-add a BindingSource (DataSource is set to some data table: for example "Products")
-add a BindingNavigator (Binding Source is set to the previously added bindingNavigator1)
-add a RadMaskedEditBox (with MaskType=Numeric and Mask = "c") with DataBindings: Value => bindingSource1 - UnitPrice
-add a new record using the yellow plus sign button in the navigator; get to the price field and just start typing your number: if you type in 15, it goes into the RadMaskedEditBox as 51.

Workaround:
Bind to Text instead of binding to Value of the RadMaskedEditBox

this.radMaskedEditBox1.DataBindings.Add(new Binding("Text", bindingSource1, "UnitPrice", true));

Resolution: 
RadMaskedEditBox with currency mask does not support null values. Default value must be 0 instead null. Please use the following code snippet: 
this.mePrice.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource1, "Price", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged, 0, "C2"));
1 comment
Jesse Dyck
Posted on: 19 Aug 2013 07:41
I found that this happens when the RadMaskedEditBox is bound to a property of type Decimal? (i.e. Nullable of Decimal).