从另一个线程访问 BindingSource

发布于 2024-10-11 06:31:15 字数 157 浏览 6 评论 0原文

我有一个漂亮的方法,用于与从另一个线程访问的控件进行交互。但现在我发现我需要访问 BindingSource 并删除一个实体。此 BindingSource 位于 DevExpress GridControl 上 ->网格视图。

我怎样才能实现这个操作?

谢谢。

i have a beautiful method that I use for interacting with controls that accessed from another thread. But now i see that i need to access a BindingSource and remove an entity. This BindingSource is on a DevExpress GridControl -> GridView.

How can i achieve this operation?

Thank you.

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

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

发布评论

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

评论(1

逆夏时光 2024-10-18 06:31:16

它的工作方式应该与从另一个线程访问控件的方式相同。可以安全地假设 BindingSource 是在与其所在表单相同的线程上创建的吗?如果是这样,请依靠表单的 InvokeRequired 属性来告诉您是否需要调用表单 Invoke 方法来调用操作 BindingSource 的函数。

It should work the same way you would access controls from another thread. Is it safe to assume that the BindingSource was created on the same thread as the form it is on? If so, rely on the form's InvokeRequired property to tell you if you need to call the forms Invoke method to invoke your function that manipulates the BindingSource.

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