Datagridview添加,删除和更新 [英] Datagridview Add,delete and update
问题描述
我不熟悉datagridview的用法.我只显示一列,而在datagridview中从数据库隐藏另一列,所以我只有一列,但有很多行.我想在数据绑定后单击按钮时添加一个空行,并想在该新添加的行中输入数据(焦点应该在添加的行上),单击具有值的行时,我应该能够编辑已经存在的内容,并且同样能够在选择行时单击删除按钮删除.我在Google中进行了搜索,但一切都令人困惑,任何人都可以帮助我.
在Advance中感谢
I am new to usage of datagridview. I''m displaying only one column and hiding another column from database in datagridview, so I have only one column, but many rows. I want to add an empty row on button click after databound and want to enter data in that newly added row(focus should be on added row), on clicking row with value I should be able to edit what is already there and similarly able to delete on selecting the row clicking the delete button. I searched in google but everything is quite confusing can anyone help me.
Thanks in Advance
推荐答案
在Google中进行搜索非常好,您必须找到许多链接.
告诉我们您在这里感到困惑的地方吗?
实施该代码时遇到任何错误吗?
Its good that you searched in google, you must have found many links.
Tell us what you find confusing there?
Are you getting any errors while implementing that code?
亲爱的,
通过谷歌,你会发现很多链接....
那么试试吧:
http://geekswithblogs.net/dotNETvinz/archive/2009/02/22/gridview-insert-edit-update-and-delete--the-ado.net-way.aspx [
Hi dear,
Go through google you will find out lots of links....
Well try for this:
http://geekswithblogs.net/dotNETvinz/archive/2009/02/22/gridview-insert-edit-update-and-delete--the-ado.net-way.aspx[^]
这篇关于Datagridview添加,删除和更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!