Last Updated: 20 Feb 2014 09:58 by ADMIN
Created on: 02 May 2012 08:52
Category: UI for WinForms
Type: Bug Report
FIX. RadColorBox - binding the Value property of the control to a property of a custom object does not work properly
- the initial object property value is not displayed
- the color change is not always reflected, even though the object implements INotifyPropertyChanged

Adding the binding in code works correctly.
1 comment
Posted on: 06 Feb 2014 16:15

When RadColorBox is bound at design time to a business object, Visual Studio creates BindingSource and new Binding object. Like the following example:
this.personBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.radColorBox1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.personBindingSource, "Color", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));

However, at run time in the BindingSource there are no objects, which is normal and expected behavior. In order to use already generated Binding object, you should add at least one business object or collection of business objects at run time.