gridview 模板列的删除按钮 页面上有保存按钮
gridview 模板列的删除按钮 点删除 是先删除一行,不进行数据库更新,这一步完成,问题点击保存时怎么把删除的行更新到数据库中?
/// <summary> /// 删除卡片 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnCancelCard_Command(object sender, CommandEventArgs e) { DataTable dableCard = this.GetDataTable(); ClientService service = new ClientService(); int i = ((GridViewRow)((ImageButton)sender).NamingContainer).RowIndex; dableCard.Rows[i].Delete(); gvCard.DataSource = dableCard; gvCard.DataBind(); WebCommon.showAlertClose(UpdatePanel1, ResourceMessage.DeleteSuccess); }