Posted on 2006-03-29
I have a listbox which has a datasource set to a List collection.
I'm trying to remove an item from the List, and then reload the listbox - expecting to see the removed item no longer present in the listbox. Here is the code to do that:
listBox1.DataSource = source;
listBox1.DisplayMember = "str";
For some reason the listbox remains the same after I execute this code. I know the code is getting reached since if I execute it enough times, an exception is raised, since there are no more items left to remove from the List. Thannks!