列表框数据更新 [英] Listbox data update

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

问题描述


想知道是否有人可以帮助我,
我有一个列表框,用于显示Access数据库中的数据.
当我添加新项目时,我的列表框不会更新,直到我重新启动
该程序.我尝试使用:

(((CurrencyManager)LstBx_Supp.BindingContext [LstBx_Supp.DataSource]).Refresh();



Dataset.clear()
Dataset.fill(..)

但没有运气,请帮忙.


wonder if someone can help me,
i''ve got a listbox that displays data from an Access database.
When I add a new item, my listbox does not update until i restart
the program. I''ve tried using :

((CurrencyManager)LstBx_Supp.BindingContext[LstBx_Supp.DataSource]).Refresh();

and

Dataset.clear()
Dataset.fill(..)

but no luck, please help.

推荐答案

只想让大家知道,
听不懂,但是能用....
刚刚再次调用Fill方法,就像它已加载一样...


this.suppNameTableAdapter.Fill(this.orderDataSet1.SuppName);

只要有效...
Just to let everyone know,
don''t understand it, but it works....
just called the Fill method again asif it loads...


this.suppNameTableAdapter.Fill(this.orderDataSet1.SuppName);

as long as it works...


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

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