刷新整个页面,不仅仅是datagrid.
因为在mdi子窗体下,对一个窗体进行了操作。另一个窗体信息有所改变,我只能关闭窗体再打开才可以看到变化,怎么才能在不关闭窗体的情况下,刷新整个页面呢?
this.refresh();这个有什么作用?
窗体名.refresh()
this.Refresh();
当前操作的窗体就是this.refresh();
刷新其他窗体久用楼上说的
this.Invalidate();
有可能是你代码的问题
最好用事件
Forces the control to invalidate its client area and immediately redraw itself and any child controls.
这个是Refresh的作用。
Invalidate();