我如何知道何时将绑定了WinForms ComboBox的数据填入数据? [英] How can I tell when a data bound WinForms ComboBox is done filling in the data?

查看:90
本文介绍了我如何知道何时将绑定了WinForms ComboBox的数据填入数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么WinForms中的ComboBox控件没有像DataGridView控件那样的DataBindingComplete事件?

我用一个DataSet填充一个组合框,其中包含要过滤DataGridView的项目.我可以正常工作,但是如何确定所有绑定了数据的项目何时已加载到ComboBox中,这样我才能第一次调用过滤器?

预先感谢您的帮助.

Why does the ComboBox control in WinForms not have a DataBindingComplete event like the DataGridView control?

I''m filling a Combobox from one DataSet with items to filter the DataGridView on. I got that working, but how do I tell when all the data bound items have finished loading into the ComboBox so I can then invoke the filter for the first time?

Thanks in advance for any help.

推荐答案

使用BindingSource,您将能够知道绑定何时完成.您可以注册到BindingComplete事件.

您可以在此处 BindingSource.BindingComplete事件 [ ^ ]
Using BindingSource you would be able to know when the binding is complete. You can register to BindingComplete event.

You can refer to the implementation here BindingSource.BindingComplete Event[^]


这篇关于我如何知道何时将绑定了WinForms ComboBox的数据填入数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆