RadListView SelectedIndexChanged is firing each time a new item is added

416 Views Asked by At

I have a problem with RadListView for C# Winforms that if I add 300 items to the listview the SelectedIndexChanged is firing 300 times. What can I do to make it stay selected on the first item and not fire every time a new item is added? Because it selects every time the last item.

This is the add code:

 this.lstFileList.Items.Add(item);
1

There are 1 best solutions below

3
On BEST ANSWER

Instead of adding them one at a time, you can bind directly to an IEnumerable using the DataSource property.