ListBox not updating when datasource changes

  • Thread starter Thread starter Tarscher
  • Start date Start date
T

Tarscher

Hi all,

I bind a list to a ListBox. Binding works but when I change the list
the data is not updated in the listbox.

Someone knows how to signal the listbox to update when the datasource
changes?

Thanks
Stijn
 
Stijn,

Is this a web app? Are you calling DataBind on the listbox after you change
the data?

Shaun McDonnell
 
Hi all,

no webapp. I found the solution by implementing BindingList I get the
updates now.
 
If you are doing .Net 2.0, you can use a Binding source between your data
source and the combobox, and this will also fix your problem. The Binding
Source acts as glue between the control and the data source, and handles
updates of the control(s) immediately when the data source is modified.

Robin S.
-----------------------------
 
Back
Top