我想要做的是当用户单击删除按钮时,我想突出显示整行并在删除之前要求确认,以下是我的代码和 iw ant 执行两个步骤:1)突出显示整行 2)要求确认。
protected void gvOrg_RowDataBound(object sender, GridViewRowEventArgs e)
{
Button btnDelete = (Button)e.Row.FindControl("btnDelete");
if (btnDelete != null)
{
//btnDelete.Attributes.Add("onclick", e.Row.BackColor = System.Drawing.Color.Red);
btnDelete.Attributes.Add("onclick", String.Format(textForMessage, "Id: " + DataBinder.Eval(e.Row.DataItem, "Id"), "Name: " + DataBinder.Eval(e.Row.DataItem, "Name")));
}
}