Home All Groups Group Topic Archive Search About

ListBox not updating when datasource changes

Author
14 Feb 2007 11:03 AM
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

Author
14 Feb 2007 2:27 PM
Shaun C McDonnell
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
>
Author
14 Feb 2007 4:14 PM
Tarscher
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
Author
15 Feb 2007 6:35 AM
RobinS
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
>
>

AddThis Social Bookmark Button