Question

I've set my DataGridView.Source property to a BindingList<T>, where T implements INotifyPropertyChanged.

It's not working though, and sure enough when I step through the code I find that nothing is subscribing to the PropertyChanged event. How do I get the BindingList to subscribe to this event

Était-ce utile?

La solution

After 30 minutes of searching for the answer, I would naturally figure it out on my own 5 seconds after I post my question.

I had INotifyPropertyChanged implemented on MyClass, but I was actually using BindingSource<IMyClass> and IMyClass didn't inherit INotifyPropertyChanged. Once I fixed that it worked.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top