gridview中checkbox不可选

Qu-俊 Qu-俊 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
this.Label1.Text = "";
CheckBox ck = (CheckBox)this.GridView1.Rows[e.RowIndex].Cells[4].Controls[0];

bool b = ck.Checked;
if (!b)
{
string uname = this.GridView1.Rows[e.RowIndex].Cells[1].Text.ToString();
string date = this.GridView1.Rows[e.RowIndex].Cells[3].Text.ToString();
string num = this.GridView1.Rows[e.RowIndex].Cells[2].Text.ToString();

if (bs.doProcedure("exec prc_addcoins '" + uname + "','" + date + "'," + num))
{
this.Label1.Text = "<script>alert('处理成功')</script>";
this.fillTable();
}
}
else
{
this.Label1.Text = "<script>alert('已经处理')</script>";


本人想在gridview中增加checkbox选中后更新数据功能,但调试后checkbox不可选,求各位大虾帮忙求解。
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
Qu-俊
C# 111,129 成员 642,540 内容