如何刷新数据? [英] How to refresh the data?

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

问题描述

大家好,
在表中插入一条记录后,我将刷新datagrid以便用户可以看到结果,我使用了此方法:

hi all,
After I insert one record in a table, i am going to refresh datagrid such that user could see the result, i used this:

Context.Refresh(System.Data.Linq.RefreshMode.OverwriteCurrentValues,Context.TableName);
this.BindingSource.DataSource = Context.TableName;
dataGridViewX1.DataSource = BindingSource ;
alarmBindingSource.ResetBindings(true);


但没有更改,并且不会显示新插入的行.

除了更新DataContext(花很长时间)之外,还有什么办法吗?

请帮忙.


but there is no change and new inserted row is not displayed.

Is there any way except re-new of DataContext(which spends long time)?

Please help.

推荐答案

Context.SubmitChanges()呢?


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

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