jbb wrote:
Hello,
Did you combobox is initialized later in the form?
Could you create a function bind OnSelectedIndexChange event and see in the call stack, when is it called?
Hi,
I fill the combobox from filtered collection in the formload event. But it also changes when another combobox on the form changes as this makes the filter of collection on the second combo.
First time selection of item, OnSelectedIndexChange is fired twice:
OnderhoudPBS.exe!OnderhoudPBS.ComponentCatalogus.cmbModel_SelectedIndexChanged(object sender = {System.Windows.Forms.ComboBox, Items.Count: 1}, System.EventArgs e = {System.EventArgs}) Line 403 C#
> OnderhoudPBS.exe!OnderhoudPBS.ComponentCatalogus.cmbModel_SelectedIndexChanged(object sender = {System.Windows.Forms.ComboBox, Items.Count: 19}, System.EventArgs e = {System.EventArgs}) Line 403 C#
Second time it is fired only once:
> OnderhoudPBS.exe!OnderhoudPBS.ComponentCatalogus.cmbModel_SelectedIndexChanged(object sender = {System.Windows.Forms.ComboBox, Items.Count: 19}, System.EventArgs e = {System.EventArgs}) Line 403 C#
It looks like for some reason first time collection in combo is empty when new filter has been applied
Thanks,
Jan