WinForms, .NET 3.5
I have a ComboBox that needs to display a growing list of items -- there is a long running process fetching items, and I want to be able to display items to the user as they build up over time.
Setting the DatSource property to a naive Array/List doesn t work since subsequent additions are not registered by the ComboBox.
Now I can set the DatSource to a BindingList -- but it seems that this becomes tragically slow. When I throttle additions things go fine; but I m adding maybe a thousand items every couple of seconds, and this rate just hangs the form.
I m entirely willing to believe this is an inherent shortcoming of binding directly to a BindingList, but would like to be better understand what is going on. The MSDN articles on DatSource, BindingList and BindingSource discuss concepts like and BindingContexts, CurrencyManagers but don t help me understand the specific events, redraws and what-not that are being fired that might cause this slow down.
I suspect the BindingSource registers an item-add event to the ComboBox, which then goes through a series of Item-additions, DropDown-checks and invalidation. But MSDN browsing and Googling hasn t helped me answer this.
Can anyone point me in the right direction?
Clarification
I m aware of the design problems, and ways to work around this problem. So I m not really looking for a solution -- but I do want to understand the deeper mechanics of what is going on.