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.
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.