Problem with List<T> and INotifyPropertyChanged

G

Gerrit

Hello,

On http://msdn2.microsoft.com/en-us/library/ms184414.aspx is an example of
the implementation of INotifyPropertyChanged Interface. I work with the C#
example.

I have tried this sample, and it works, but I have a problem with it.

When I push the button, the first CompanyName is changed in Tailspin Toys
directly.
But when I changed the code in customerList[1] (instead of 0) then I have to
click on the cell before I see the changes.

When I copy the line of code, so I have customerList[0] and customerlist[1]
and I click, only the first CompanyName changed and not the second unless I
click on the cell.

In this sample, the datasource is based on List<DemoCustomer> customerList.
I have changed List in BindingList and then it seems to work.

So my question is: Does it have to work with List<T> or is the example bad?
And is it ok to use BindingList instead of List?

Thanks, Gerrit
 

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

Top