组合框 [英] Combo Box

查看:78
本文介绍了组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个组合框,我想在点击保存按钮后刷新数据。我知道在web开发人员中你可以说datasource.databind,但我在vb.net中没有看到。请有人帮帮我。

I have a combo box that I want to refresh the data of after the save button is clicked. I know that in web developer you can just say datasource.databind but I do not see that in vb.net. Please can someone help me out.

推荐答案

我很确定组合框有数据源属性。

http://msdn.microsoft.com/en-us/library/x8160f6f.aspx
I''m pretty sure a combobox has a datasource property.

http://msdn.microsoft.com/en-us/library/x8160f6f.aspx


是的,组合框有一个数据源,但我的问题是在我将数据保存到数据库后刷新该数据源。当我这样做时,我看到了:mycombobox.refresh(),它重复组合框中的数据。
Yes, a combo box has a datasource but my question is to refresh that datasource after I saved something to the database. I saw that when I do: mycombobox.refresh() that it repeats the data in the combobox.


这有点离开我的区域但是......

如果将数据源设置为null - 强制清除 - 然后将数据源设置回数据库 - 强制它获取最新值,该怎么办?
This is getting a little out of my area but...
What if you set the datasource to null - forcing a clear - then set the datasource back to the database - forcing it to obtain the most current values?


这篇关于组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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