如何在vb.net中刷新datagrid [英] how to refresh datagrid in vb.net
本文介绍了如何在vb.net中刷新datagrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的专家,
我有一个与数据网格有关的问题...我添加了数据并将其存储在dbase(此处为foxpro)中,但未显示在数据网格中...当我关闭并打开存在datagrid的表单时,它是显示该数据... vb.net中的所有这些信息...
Dear experts,
I have a question related to data grid...I added data and it got stored in dbase(foxpro here) but it is not displaying in data grid...When i close and open the form in which datagrid is present then it is displaying that data...All this in vb.net...
推荐答案
如果您绑定到DataGrid/DataGridView(您应该说出它们是不同的,东西)使用BindingSource,则可以使用BindingSource.ResetBindings(在MSDN上查找).
否则,将网格的数据源设置为nothing
,然后返回到正确的数据库.这应该使它刷新.
If you are binding to the DataGrid/DataGridView (you should say which, they are different things) using a BindingSource then you can use BindingSource.ResetBindings (look it up on MSDN).
Otherwise set the DataSource of the grid tonothing
, then back to the proper database. This should cause it to refresh.
这篇关于如何在vb.net中刷新datagrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文