编辑数据网格视图单元并在数据库中进行更改.. [英] Editi the data grid view cell and changes to be made in database ....

查看:112
本文介绍了编辑数据网格视图单元并在数据库中进行更改..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

请帮助我解决以下查询:

在datagridview单元格中更改当前数据时,我想在sql数据库的后端更新表.

我想要的是,当用户通过编辑特定单元格在datagridview单元格中进行更改时,所做的更改应反映在数据库表中.

例如:
我在WinForm上有Datagridview,在数据库的后端有表EmpDetails.我正在用表EmpDetails填充Datagridview".当用户单击一个单元格并在Datagridview单元格中进行更改后,无论在datagridview中进行的任何更改都应反映在表EmpDetails的后端.
有什么办法可以做到这一点,因为我是初学者...谢谢

Hi all,

Please help me in solving following query:

I want to update table at backend in sql database when making changes in datagridview cells current data.

What I want is, when User makes changes in datagridview cells by editing the specific cell than the changes which are made should get reflect in table in database.

For ex:
I am having Datagridview on WinForm and table EmpDetails at backend in databse. I am filling Datagridview with table EmpDetails". When user click a cell and After making changes in Datagridview cell whatever changes made in datagridview should get reflect at backend in table EmpDetails..

is there any way to do this as i am beginner here ...thanks

推荐答案

当您是初学者时,尝试在不学习的情况下执行现实世界中的任务首先是程序,可能为此付出了代价,事实是您要成为一名程序员会很挣扎,因为您忙于完成自己的工作,以至于无法真正学习.当然,您从此论坛中寻求的复制/粘贴解决方案对您没有长期的帮助.该网站上有关于此类内容的大量文章,您应该花时间阅读一些内容.这是一个.

在ASP.NET Gridview中插入,更新,删除,将数据源作为SQL服务器,MS Access(mdb/accdb),XML和Framework为2.0/3.0/3.5/4.0(VS 2005/2008/2010) [
As you''re a beginner, trying to do real world tasks without learning to program first, probably being paid for it, the fact is that you''re going to struggle with ever being a programmer, b/c you''re too busy trying to finish your job, to ever actually learn. Certainly a copy/paste solution as you''re seeking from this forum, does not help you long term. The site has TONS of articles on stuff like this, you should take the time to read some. Here is one.

Insert, Update, Delete in ASP.NET Gridview, DataSource as SQL Server, MS Access (mdb/accdb), XML and Framework as 2.0 / 3.0 / 3.5 / 4.0 (VS 2005/2008/2010)[^]


这篇关于编辑数据网格视图单元并在数据库中进行更改..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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