如何删除Gridview行? [英] How to delete Gridview row?

查看:62
本文介绍了如何删除Gridview行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在下拉列表中选择另一个值时如何删除要删除的gridview行?

解决方案

引用:

因为我使用gridview来显示数据。在那我使用Dropdownlist。我选择下拉列表时想要回答,我想删除whoole行。

SelectedIndexChanged DropDownList ,只需获取当前 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 of DropDownList, just get the Primary Key of the current GridViewRow. Find that from the DataSource or Database and delete that.

Now get the Rows again from Database and bind to GridView.


这篇关于如何删除Gridview行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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