且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将数据从datagridview保存到数据库C#

更新时间:2021-07-02 22:50:22

建议使用 BindingSource ,这个您的数据将自动保存的方式,请参见此处的示例: [ 如何:将数据绑定到Windows窗体DataGridView控件]

在此处查看CodeProject文章:详细的数据绑定教程 [ ^ ]
Using a BindingSource is the recommended way, this way your data will be saved automatically, see example here: [How to: Bind Data to the Windows Forms DataGridView Control]
And see CodeProject article here: A Detailed Data Binding Tutorial[^]