I have a problem when removing entrys from a BindingList in connection with a DataGridView Here some informations first:
I have a class
public class DeliveryTimeList<T> : IEnumerable<T>, IDeliveryTimeObject where T : IDeliveryTimeData
which implements this interface
public interface IDeliveryTimeObject : IListSource
I use this DeliveryTimeList in a DataGridView.
My class contains a List with visible objects
private List<T> _visibleList;
Because i implement the IListSource i have this Method
public IList GetList()
{
BindingList<T> blt = new BindingList<T>(_visibleList);
return blt;
}
When now removing an entry from my _visibleList i get a System.IndexOutOfRangeException. I can't figure out why this is happening. Shouldn't the BindingList handle this ?