如何删除Gridview行? [英] How to delete Gridview row?
本文介绍了如何删除Gridview行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果在下拉列表中选择另一个值时如何删除要删除的gridview行?
解决方案
引用:因为我使用gridview来显示数据。在那我使用Dropdownlist。我选择下拉列表时想要回答,我想删除whoole行。
SelectedIndexChanged
DropDownList $ c $的事件c>,只需获取当前
GridViewRow
的主键。从DataSource
或数据库中找到它并删除它。
现在从数据库再次获取行并绑定到GridView的
How to delete gridview row to be deleted when dropdownlist is selected another value?
解决方案
Quote:As I have used gridview to display datas.In that i m using Dropdownlist. I want answer when I select dropdownlist, I want to delete the whoole row.
Inside the
SelectedIndexChanged
Event ofDropDownList
, just get the Primary Key of the currentGridViewRow
. Find that from theDataSource
or Database and delete that.
Now get the Rows again from Database and bind toGridView
.
这篇关于如何删除Gridview行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文