BindingSource 有什么方法可以知道值的变化吗?

发布于 2024-10-01 00:28:53 字数 174 浏览 10 评论 0原文

我在 Windows 窗体应用程序中使用 BindingSource,有许多控件与 BindingSource 绑定。

我不想监视控件来获取更改,我可以知道 BindingSource 中的值是否通过事件发生更改吗?

我在其中寻找事件,但没有找到。

提前致谢。

I'm using a BindingSource in a windows forms application, there are many controls was bound with a BindingSource.

I don't want to monitor the controls to get the changes, can I know if a value changed from the BindingSource by an event?

I looked for an event in it, but I didn't find.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷夜 2024-10-08 00:28:53

您可以使用 BindingSource.ListChanged事件。

当 List 属性表示的基础列表的成员资格或元数据发生更改时,将发生 ListChanged 事件。例如,当添加、删除或移动项目,或者 DataSource 或 DataMember 属性更改时,会引发此事件。

You can use the BindingSource.ListChanged event.

The ListChanged event occurs when there is a change to the membership or metadata of the underlying list represented by the List property. For example, this event is raised when items are added, removed, or moved, or the DataSource or DataMember properties change.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文