PC Review


Reply
Thread Tools Rate Thread

ListBox not updating when datasource changes

 
 
Tarscher
Guest
Posts: n/a
 
      14th Feb 2007
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

 
Reply With Quote
 
 
 
 
Shaun C McDonnell
Guest
Posts: n/a
 
      14th Feb 2007
Stijn,

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

Shaun McDonnell

"Tarscher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>

 
Reply With Quote
 
Tarscher
Guest
Posts: n/a
 
      14th Feb 2007
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:(E-Mail Removed)...
>
> > 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



 
Reply With Quote
 
RobinS
Guest
Posts: n/a
 
      15th Feb 2007
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.
-----------------------------
"Tarscher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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:(E-Mail Removed)...
>>
>> > 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

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox DataSource =?Utf-8?B?V2hpdGVXaXphcmQ=?= Microsoft C# .NET 1 28th Sep 2006 07:38 PM
I set listbox.datasource to fileinfo() object, but no files appear in the listbox. COHENMARVIN Microsoft ASP .NET 1 14th Oct 2005 10:19 PM
I've got a strange bug with Listbox.DataSource... Zoury Microsoft C# .NET 1 6th Nov 2004 01:51 AM
RE: Updating a simple ListBox from the DataSource Rami Saad Microsoft Dot NET Framework Forms 0 13th Sep 2004 04:16 PM
ListBox DataSource Igor Vrdoljak Microsoft Dot NET Framework Forms 2 4th Oct 2003 02:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:13 PM.