Databinding and a Typed Collection

  • Thread starter Thread starter solex
  • Start date Start date
S

solex

Hello All,

I have a type collection I created that inherits from
System.Collection.CollectionBase. I use this collection as a datasource for
a combo box. I notice that when I add items to this collection that the
combo box is not updated.

I would prefer it is automatically updated, is there a property I am missing
or do I need to peform this operation myself?

Thanks,
Dan
 
CollectionBase only implements IList, ICollection, and IEnumerable.

None of which raise a ListChanged event. To do so, you need to implement
IBindingList, which will raise the ListChanged event used in Windows Forms
databinding.

Hope it helps,
CJ
 
Back
Top