protected void modDeleteCommand(Object sender, GridViewDeleteEventArgs e) { string id = GridView1.DataKeys[e.RowIndex].Value.ToString(); ClassPositionWork pw = new ClassPositionWork(); pw.POSITION_WORK_ID = id; pw.DeletePositionWork(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('ลบข้อมูลเรียบร้อย')", true); GridView1.EditIndex = -1; BindData1(); }