Hello!
I found the following problem with the latest (v.2011.2 11.712) RadDropDownList:
The drop-down list is bound to the BindingSource. When I assign the binding source's DataSource to a list, the drop-down list control shows the first item but the SelectedItem and SelectedValue fields are still set to null as well as the SelectedIndex is set to -1. In the earlier version the fields were set to the corresponding values. If I assign the drop-down list's DataSource to a list directly, it works well.
This is very upsetting issue, because a lot of already tested code places becomes unstable unexpectedly.
Thank you.
I found the following problem with the latest (v.2011.2 11.712) RadDropDownList:
The drop-down list is bound to the BindingSource. When I assign the binding source's DataSource to a list, the drop-down list control shows the first item but the SelectedItem and SelectedValue fields are still set to null as well as the SelectedIndex is set to -1. In the earlier version the fields were set to the corresponding values. If I assign the drop-down list's DataSource to a list directly, it works well.
using
System;
using
System.Collections.Generic;
using
System.Windows.Forms;
namespace
Test
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
protected
override
void
OnLoad(EventArgs e)
{
base
.OnLoad(e);
List<Data> list =
new
List<Data>();
list.Add(
new
Data() { Value =
"A"
});
list.Add(
new
Data() { Value =
"B"
});
list.Add(
new
Data() { Value =
"C"
});
radDropDownList1.ValueMember = radDropDownList1.DisplayMember =
"Value"
;
radDropDownList1.DataSource = bindingSource;
bindingSource.DataSource = list;
}
}
public
class
Data
{
public
string
Value {
get
;
set
; }
}
}
This is very upsetting issue, because a lot of already tested code places becomes unstable unexpectedly.
Thank you.