public void grdDrawingList_DeleteCommand(object sender, DataGridCommandEventArgs e) { String DetailId = ""; DetailId = grdDrawingList.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); contingency _wc = new contingency(); _wc.DeleteDrawingList(Convert.ToInt32(DetailId)); BindDrawingList(Convert.ToInt32(ViewState["EstNum"].ToString())); }