|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ListBox not updating when datasource changesHi 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 Show quote "Tarscher" <tarsc***@gmail.com> wrote in message news:1171451011.627334.231840@s48g2000cws.googlegroups.com... > 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 > Hi all,
no webapp. I found the solution by implementing BindingList I get the updates now. Show quote On 14 feb, 15:27, "Shaun C McDonnell" <sm-nospammmmm...@eisoft.com> wrote: > Stijn, > > Is this a web app? Are you calling DataBind on the listbox after you change > the data? > > Shaun McDonnell > > "Tarscher" <tarsc***@gmail.com> wrote in message > > news:1171451011.627334.231840@s48g2000cws.googlegroups.com... > > > 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 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. ----------------------------- Show quote "Tarscher" <tarsc***@gmail.com> wrote in message news:1171469678.784457.143560@l53g2000cwa.googlegroups.com... > Hi all, > > no webapp. I found the solution by implementing BindingList I get the > updates now. > > On 14 feb, 15:27, "Shaun C McDonnell" <sm-nospammmmm...@eisoft.com> > wrote: >> Stijn, >> >> Is this a web app? Are you calling DataBind on the listbox after you >> change >> the data? >> >> Shaun McDonnell >> >> "Tarscher" <tarsc***@gmail.com> wrote in message >> >> news:1171451011.627334.231840@s48g2000cws.googlegroups.com... >> >> > 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 > > |
|||||||||||||||||||||||