【发布时间】:2014-02-13 09:55:46
【问题描述】:
我已将 DataGridView.Source 属性设置为 BindingList<T>,其中 T 实现了 INotifyPropertyChanged。
但它不起作用,当我单步执行代码时,我确实发现没有任何东西订阅 PropertyChanged 事件。如何让 BindingList 订阅此事件
【问题讨论】:
标签: c# datagridview inotifypropertychanged
我已将 DataGridView.Source 属性设置为 BindingList<T>,其中 T 实现了 INotifyPropertyChanged。
但它不起作用,当我单步执行代码时,我确实发现没有任何东西订阅 PropertyChanged 事件。如何让 BindingList 订阅此事件
【问题讨论】:
标签: c# datagridview inotifypropertychanged
经过 30 分钟的搜索,我自然会在发布问题 5 秒后自行解决。
我在MyClass 上实现了INotifyPropertyChanged,但实际上我使用的是BindingSource<IMyClass>,而IMyClass 并没有继承INotifyPropertyChanged。一旦我修复它就可以了。
【讨论】: