0
点赞
收藏
分享

微信扫一扫

DataGridView删除加提示

鱼满舱 2022-07-12 阅读 112


protected void gvAve_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            LinkButton btnDelete = (LinkButton)e.Row.Cells[e.Row.Cells.Count-1].Controls[0];
            btnDelete.Attributes.Add("onclick", "javascript:return " + "confirm('确定要删除途径 [" + DataBinder.Eval(e.Row.DataItem, "AveName") + "]')");
        }
    }

举报

相关推荐

0 条评论