6
Reply

Add New Item in GridView

Ask a question
Vignesh Kumar

Vignesh Kumar

11y
1.8k
1
Hi,
I have a "Add New" button inside the grid and I am not able to add items to the grid.
protected void ResultGridView_RowCommand(object sender, GridViewCommandEventArgs e)
  {
  try
  {
  if (e.CommandName.Equals("AddNew"))
  {
  TextBox Lob = (TextBox)GridView1.FooterRow.FindControl("txtLob");
  TextBox LobDescription = (TextBox)GridView1.FooterRow.FindControl("txtLobDescription");
  LOBDataBO.InsertLOBValues(Lob.Text, LobDescription.Text);
  FillVendorGrid();
  }
  }
  catch (Exception exc)
  {
  Logger.LogError(exc, MethodBase.GetCurrentMethod().ToString());
  UtilityMethods.RedirectToErrorPage(Constants.Message_ErrorProcessingRequest);
  }
  }

Attachment: savesendmail.zip

Answers (6)