Hey everybody. I just realized (once more) how lame my coding is…
The situation :
I have one listbox and three popup menus which I use to filter the results shown in that listbox.
Populating the menus is done programmatically as these menus appear many times in my app with different amount of entries.
The conflict :
As this menus are used as dinamic filters for the listbox, every time the selection in one of these popupmenus is changed, the listbox is updated. I am using the change event handler, to update the listbox.
This means, that every time a new entry is added to the each menu while being populated, the listbox itself is populated again, as the change event handler is triggered.
Each menu may have 6-7 entries, so the listbox is filled maybe 20 times in a row… Talking about waste of resources… That databse wants to kill me.
What better options do I have ?
Thanks for the feedback.