本文介绍了刷新主窗体中可用的数据网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Windows窗体应用程序中,有两种形式即: MainForm(父表单)和ProductionDetails(子表单)。每当我运行应用程序时,MainForm首先打开。在MainForm中,有一个dataGridview1用于显示DB中Production表的生产数据,一个button1控件用于打开MainForm上面的ProductionDetails。

现在,我的查询就是每当我插入一个新行时在DB的Production表中,MainForm中可用的dataGridview1应该在同一时间刷新。请帮我解决这个问题。

In my Windows Form Application, there are two forms viz; MainForm(Parent Form) and ProductionDetails(Child Form) . Whenever I run the application the MainForm opens first. In the MainForm, there is a dataGridview1 is used for displaying Production data from Production table in DB and a button1 control to open ProductionDetails above MainForm.
Now, my query is that, whenever I insert a new row in Production table in DB, the dataGridview1 available in MainForm should be refreshed in the same time. Please help me in solving this problem.

推荐答案


这篇关于刷新主窗体中可用的数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 01:36