PC Review


Reply
Thread Tools Rate Thread

Binding problem

 
 
csharpula csharp
Guest
Posts: n/a
 
      29th Nov 2007
Hello,I use the following data binding: controlA.DataSource = someList;.
The someList content changes due to some other form object behaivior and
controlA still presents not updated data.Why? Isn't DataSource provides
binding that holding a reference to the binded list? How can I solve
this? Thank you!



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      29th Nov 2007
A regular list has no way of notifying what it is bound to that it has
changed. You will have to implement IBindingList, which will give the list
a mechanism to know when items changed in the list.

You can also use BindingList<T>, which implements IBindingList, but you
will have to work with that everywhere, as it makes a copy of the collection
you pass to it, it doesn't hold a reference to the original.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"csharpula csharp" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,I use the following data binding: controlA.DataSource = someList;.
> The someList content changes due to some other form object behaivior and
> controlA still presents not updated data.Why? Isn't DataSource provides
> binding that holding a reference to the binded list? How can I solve
> this? Thank you!
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
csharpula csharp
Guest
Posts: n/a
 
      29th Nov 2007
In my case I tried to do such thing with BindingList<obj> :
ListBox1.DataSource = nBindingList;
//nBindingList is of type BindingList<obj> .
But still a change that occure at binding list is not being seen at
ListBox. Why ? Thank you!


*** Sent via Developersdex http://www.developersdex.com ***
 
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
Problems with binding to binding source on base form in VS 2005 =?Utf-8?B?SmltIFRpbHNvbg==?= Microsoft Dot NET Framework Forms 3 17th Oct 2006 12:19 PM
Binding problem Steven Blair Microsoft C# .NET 0 10th Oct 2005 03:52 PM
Binding Problem on VC++ 6.0 with SP5 =?Utf-8?B?TXVoYW1tYWQgQWxpIGtoYW4=?= Microsoft Windows 2000 Active Directory 2 28th Mar 2005 01:51 PM
Re: Data Binding - using inline code vs. functions vs. straight binding Alvin Bruney [MVP] Microsoft ASP .NET 0 9th Mar 2004 01:24 PM
Binding problem Bamse Microsoft C# .NET 0 13th Feb 2004 12:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:55 AM.