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.
-----------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top