VagabondSW Posted December 6, 2005 Posted December 6, 2005 I have a ListBox control bound to an ArrayList: Dim m_expressionFilters As ArrayList Dim m_expressionBindingManager As BindingManagerBase m_expressionFilters = New ArrayList m_expressionBindingManager = BindingContext(m_expressionFilters) lstboxFilters.DataSource = m_expressionFilters When I add an Item to the ArrayList, that change is immediately reflected in the ListBox: m_expressionBindingManager.SuspendBinding() m_expressionFilters.Add(CurrentFilter) m_expressionBindingManager.ResumeBinding() However, when I call the Clear method of the ArrayList, the changes are not reflected in the ListBox: m_expressionBindingManager.SuspendBinding() m_expressionFilters.Clear() m_expressionBindingManager.ResumeBinding() At this point, the m_expressionFilters ArrayList has a Count of zero, but the Items formerly held in the ArrayList are still listed on the form in the ListBox. I have tried calling the Refresh and Update methods on the ListBox, but that produced no visible changes at all. Any help or advice would be greatly appreciated. Quote "Never ascribe to malice that which can adequately be explained by incompetence." -- Napolean Bonaparte
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.