PropertyGrid and INotifyPropertyChanged problem

C

Chris

Hi,

I've got a problem with the PropertyGrid and the
INotifyPropertyChanged interface. I have a class that implements the
INotifyPropertyChanged and raises the PropertyChanged when a property
of this class is changed. My PropertyGrid is connected to this object
through the SelectedObject property.

My problem is that the PropertyGrid does not get updated when the
object's property value is changed. I can see that the
INotifyPropertyChanged.PropertyChanged is null which means that the
PropertyGrid is not attached to this event.

How can I make the PropertyGrid listen to
INotifyPropertyChanged.PropertyChanged events?

Best regards,
Chris
 
C

Chris

Hi Nicolas,

thanks for your posting.

Linda's solution seems to work, but only if there are other bindings
active. If the PropertyGrid and the DemoCustomer are the only citizens
on a Form, the PropertyGrid update still doesn't work when a
DemoCustomer property is modified. But if you add additional databound
controls to the form that are bound to any property of the
DemoCustomer object, also the PropertyGrid is getting updated. Very
strange behaviour.

Best regards,
Chris
 

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