的WinForms C#DataGridView的力量刷新 [英] WinForms C# DataGridView force refresh

查看:167
本文介绍了的WinForms C#DataGridView的力量刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

婴儿的步骤滚动...我有绑定到表数据网格的形式。我有一个绑定表[列]在窗体上的一些文本框,所以我滚动发车,文本框显示相应的数据。

Baby steps rolling... I have a form with a data grid bound to a table. I have some textboxes on the form bound to the table[columns], so as I scroll the grid, the textboxes show corresponding data.

我去一个编辑模式文本框和更改内容并点击保存按钮。网格不会刷新更改的情况下,直到我身体中强制OnChanging表通话和事件调用onChanged ...

I go to an "Edit Mode" of the textboxes and change the content and hit a save button. The grid doesn't refresh the changed context until I physically click in the cell which forces a call to the tables OnChanging and OnChanged events...

我怎样才能迫使单击单元格的任何活动以刷新在我编辑的表底,并将它刷新在DataGridView。

How can I FORCE whatever event to "flush" the table at the end of my edit and have it refreshed in the datagridview.

感谢

推荐答案

您是否尝试过在调用的dataGridView的Invalidate方法?

Have you tried calling the dataGridView's Invalidate method?

this.dataGridView1.Invalidate();

这篇关于的WinForms C#DataGridView的力量刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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