combobox items count event ?

  • Thread starter Thread starter VaNTa
  • Start date Start date
V

VaNTa

hello

I have a small problem with combobox. i wonder if there is an event
which fires when members of Items collection change?. For example this
event should fire when i add or delete an item, or where i clear the
collection - generally speaking when the Items.Count number is
changed.

VaNTa
vanta(at)wp(dot)pl
 
Hi VaNTa,

I don't think there is anything in the ComboBox that will fire an event when items change. The closest thing might be the DropDown event occuring when you click the DropDown button. You probably should do the code when you add or remove the items.

Happy coding!
Morten Wennevik [C# MVP]
 
You can allways *try* and derive from combobox, override the add and remove
methods and fire an added event to announce the collection change.
this is just a thought, didnt check if the methods can be overridden.

picho
 
I don't think there is anything in the ComboBox that will fire an event when items change. The closest thing might be the DropDown event occuring when you click the DropDown button. You probably should do the code when you add or remove the items.
Happy coding!
Morten Wennevik [C# MVP]

i didn't mention that my comboxes are binded to dataset with
master/detail realtionship. so what i exactly want is to get an event
when i change selected index in the first combobox and AFTER
databindings fill the second combobox.

maybe there is an event in binding menager on binding context ?

vanta
 
Back
Top