Unplanned
Last Updated: 19 Jun 2017 11:03 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 09 May 2017 09:53
Category: Editors
Type: Bug Report
2
FIX. RadDropDownList - unable to bind when nested properties are used
Please refer to the attached sample project and attached gif file which illustrates the desired behavior when RadForm1 is run. If you run RadForm2 which uses RadDropDownList, the binding doesn't work as expected.

Workaround:
this.radDropDownList1.SelectedIndexChanged += RadDropDownList1_SelectedIndexChanged;
this.radDropDownList1.DisplayMember = "Naziv";
this.radDropDownList1.ValueMember = "Id";
this.radDropDownList1.DataSource = bs;

private void RadDropDownList1_SelectedIndexChanged(object sender, 
    Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
    if (e.Position > -1)
    {
        Roditelj parent = this.radDropDownList1.SelectedItem.DataBoundItem as Roditelj;
        this.radDropDownList2.DataSource = null;
        this.radDropDownList2.DisplayMember = "Naziv";
        this.radDropDownList2.ValueMember = "Id";
        this.radDropDownList2.DataSource = parent.Djeca;
    } 
}
0 comments