Completed
Last Updated: 05 Jun 2014 07:07 by Jesse Dyck
ADMIN
Peter
Created on: 02 Jan 2013 05:35
Category:
Type: Bug Report
4
FIX. Wrong initial SelectedIndex when using DataSource property
Wrong initial SelectedIndex in RadListControl/RadDropDownList when using DataSource property
Step to reproduce:
public RadForm1()
{
InitializeComponent();
this.radDropDownList1.DataSource = datasource;
this.radDropDownList1.SelectedIndex = -1;
}

private void radButton1_Click(object sender, EventArgs e)
{
            MessageBox.Show("SelectedIndex= " + this.radDropDownList1.SelectedIndex);
}

Workaround:
 this.radDropDownList1.ListElement.DataLayer.DataView.MoveCurrentToPosition(-1);
2 comments
Jesse Dyck
Posted on: 02 Jan 2013 13:40
no, my workaround is not always working :)
Jesse Dyck
Posted on: 02 Jan 2013 13:36
other version of workaround:
this.radDropDownList1.ListElement.DataLayer.Refresh();