public void grdItemBreakDown_UpdateCommand(object sender, DataGridCommandEventArgs e) { String DetailId = ""; DetailId = grdItemBreakDown.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); contingency _wc = new contingency(); _wc.UPDATEProjectItemBreakdown(Convert.ToInt32(DetailId), ((TextBox)(e.Item.FindControl("txtIno"))).Text.ToString(), ((TextBox)(e.Item.FindControl("txtIdesc"))).Text.ToString(), ((TextBox)(e.Item.FindControl("txtIAmount"))).Text.ToString()); grdItemBreakDown.EditItemIndex = -1; grdItemBreakDown.ShowFooter = true; BindItemBreakDown(Convert.ToInt32(ViewState["EstNum"].ToString())); }