Completed
Last Updated: 10 Mar 2017 08:39 by Vuqar
ADMIN
Dimitar
Created on: 13 Mar 2015 08:33
Category:
Type: Bug Report
2
FIX. RadDataEntry - when the control is bound to an object that contains enumeration the value cannot be changed properly.
To reproduce:
- Bind the control to a list of the following objects:
 public class MyObj
{
    public MyEnum TestEnum { get; set; }

    public MyObj(MyEnum testEnum)
    {
        this.TestEnum = testEnum;
    }
}

public enum MyEnum : int
{
    Value1,
    Value2,
    Value3,
    Value4
}

- Change the value and move to the next entry.
- You will notice that the value of the previous entry is not changed.

Workaround:
void radDataEntry1_BindingCreating(object sender, Telerik.WinControls.UI.BindingCreatingEventArgs e)
{
    if (e.Control is RadDropDownList)
    {
        e.PropertyName = "SelectedValue";
    }
}
3 comments
Vuqar
Posted on: 10 Mar 2017 08:39
Thank you! This helped me. I`ve 2016, but it is fixed only in 2017 version
ADMIN
Stefan
Posted on: 02 Apr 2015 10:00
Did you see the workaround at the end of the description?

Workaround:
void radDataEntry1_BindingCreating(object sender, Telerik.WinControls.UI.BindingCreatingEventArgs e)
{
    if (e.Control is RadDropDownList)
    {
        e.PropertyName = "SelectedValue";
    }
}
Stephane
Posted on: 20 Mar 2015 12:59
Great!!! It gets the job done and is very compact!!! 
I was wondering how to get around that bug but could not figure an elegant way. :-)