如何将DataGridView数据反映到SQL数据表中? [英] how to reflect the DataGridView data into the SQL data table?

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

问题描述

你好!
小问题
我已经像这样在DataGridVew中进行了更改
dgvClients.SelectedRows [0] .Cells ["cl_cardemitted"].Value = 1

如何将数据反映到SQL数据表中?

Hi there!
small question
I''ve made a changes in my DataGridVew like this
dgvClients.SelectedRows[0].Cells["cl_cardemitted"].Value=1

how to reflect the data into the SQL data table?

推荐答案

由于数据已绑定到datagrid,因此需要对数据进行更改,而不是对网格进行更改以便在数据库中对其进行更新.当然,只要您提供调用某种更新方法即可将数据推回数据库中.
Since the data is bound to the datagrid you need to make the change to the data, not to the grid in order for it to be updated in the database. Provided of course you call some sort of update method to push the data back to the database.


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

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