Completed
Last Updated: 07 Jul 2014 12:44 by ADMIN
ADMIN
Dimitar
Created on: 08 Apr 2014 10:58
Category:
Type: Bug Report
0
FIX. RadDataEntry - when the control is bound to a BindingSource which on the other hand is bound to a data table with enumeration column the value is not displayed.
To reproduce:
- Create a binding source and use the following datatable as its datasource:
 static DataTable GetTable()
{
    DataTable table = new DataTable();

    table.Columns.Add("Str", typeof(string));
    table.Columns.Add("Days", typeof(Days));
    
    table.Rows.Add("Value 1", Days.Fri);
    table.Rows.Add("Value 2", Days.Mon);

    return table;
}

- Bind the data entry to the binding source
- You will notice that the enum value is not displayed.

Workaround:
void radDataEntry1_BindingCreating(object sender, BindingCreatingEventArgs e)
{
    if (e.DataMember == "Days")
    {
        e.PropertyName = "SelectedIndex";
    }
}

0 comments