Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hai,

I want to hold the gridview details.when i click resume button the web page should

allow to enter further details in same invoice number.

note : gridview is not bind to database .



any ideas.
Posted
Comments
Sandeep Mewara 6-Jun-12 7:48am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

VB
Get the grid view count then implement the below code

protected void GridView1_RowCommand
(object sender, GridViewCommandEventArgs e)
{
  if (e.CommandName == "Add")
  {
   string strFirstName = ((TextBox)
   GridView1.FooterRow.FindControl("txtFname")).Text;

   string strLastName =
   ((TextBox)GridView1.FooterRow.FindControl
                         ("txtLname")).Text;

   string strDepartment =
   ((TextBox)GridView1.FooterRow.FindControl
                            ("txtDept")).Text;
   string strLocation = ((TextBox)GridView1.FooterRow.
                          FindControl("txtLoc")).Text;

  SqlDataSource1.InsertParameters["fieldname"].DefaultValue
                                             = strFirstName;
  SqlDataSource1.InsertParameters["fieldname"].DefaultValue
                                             = strLastName;
  SqlDataSource1.InsertParameters["fieldname"].DefaultValue
                                             = strDepartment;
  SqlDataSource1.InsertParameters["fieldname"].DefaultValue
                                            = strLocation;<b></b>
  SqlDataSource1.Insert();
  }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900