public void grdActivity_UpdateCommand(object sender, DataGridCommandEventArgs e) { String activity_id = ""; activity_id = grdActivity.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); whitfield_reports _wRep = new whitfield_reports(); _wRep.UpdateReportActivity(Convert.ToInt32(activity_id), ((TextBox)(e.Item.FindControl("txtinstallhours"))).Text, (((TextBox)(e.Item.FindControl("txtNotes"))).Text).ToString()); grdActivity.EditItemIndex = -1; grdActivity.ShowFooter = true; this.DisplayReportGrid(); DisplayHistoryGrid(); }