Weird BindingList - BindingSource problem: Add(New)/Insert/... not called

  • Thread starter Thread starter Pieter
  • Start date Start date
P

Pieter

Hi,

I have a custom List that inherits from BindingList.
It has some methods overloaded, like the Add/Insert/etc to add and remove
some eventhandlers when adding or removing an item T of the list.

The problem happens when:
- I use such a BindingList as DataSource for a BindingSource.
- Add this BindingSource as DataSource for a DataGridView.
- And go to the NewRow and add a new row in the DataGridView.

None of the overloaded Add/AddNew/AddNewCore/Insert/InsertAt of my
BindingList are called! So the eventhandlers aren't added to the newly added
object neither. But when I look at my BindingList, it has an Item added...
So somehow this Item is added to the BindingList, but not via the 'normal'
ways?

How does this come, and how to avoid this? I just don't get it that a new
Object is added, without using the overloaded functions of my BindingList??

Anybody has any idea? And a solution?

Any help will be really appreciated!
Thanks a lot in advance,

Pieter
 
Ok nevermind: I had to shadow the methods, and it was the Protected
Overrides Sub InsertItem-method that was called...
 
Back
Top