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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top