有关gridview数据行删除弹出对话框确认的问题。
项目需求有变更,要求在删除某一行数据时必须弹出对话框确认。
代码如下,请高手指教
protected void DG_GYSXX_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
try
{
int index = Convert.ToInt32(e.RowIndex);
string deptid = DG_GYSXX.Rows[index].Cells[2].Text;
DeleteGYSXX(deptid);
Label_msg.Text = "删除成功";
}
catch (Exception ex)
{
throw (ex);
}
}
private void DeleteGYSXX(string deptid)
{
try
{
string deptid1 = deptid;
string valueList = deptid1;
myweb.EXEC_Proc4(BasicCode.DEL_DEPARTAD_N, userid, ref op, ref valueList);
}
catch (Exception ex)
{
throw (ex);
}
}