Completed
Last Updated: 14 Dec 2018 15:41 by Dimitar
ADMIN
Dimitar
Created on: 11 Dec 2018 06:47
Category: DropDownList/ListControl
Type: Bug Report
0
FIX. RadListControl - the Selected property has invalid value inside the SelectedItemsChanged event
To reproduce: 
private void RadListControl1_SelectedItemsChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
{
    string s = $"Selected Count = {radListControl1.SelectedItems.Count}, SelectedItems[0].Selected = {radListControl1.SelectedItems[0].Selected}, Items[0].Selected = {radListControl1.Items[0].Selected}";

    MessageBox.Show(s);
}

private void radButton1_Click(object sender, EventArgs e)
{
    string[] Names = { "Microsoft"/*, "Apple", "Google"*/ };

    radListControl1.Items.AddRange(Names);
}       

Workaround: 
Use SelectedIndexChanged event.
0 comments