Insertion into GridView

A

anil

i have added a footer row in the gridview and a link button in the footer row for insertion of new row into the database. when i press new button, appropriate textboxes are appearing in the footer row. i had written the code in Page_Load() as follows
protected void Page_Load(object sender, EventArgs e)
{

lbNew = new LinkButton();
lbNew.Text = "New";
GridView2.FooterRow.Cells[4].Controls.Add(lbNew);
New_Button_On_Click += new dlgNew(GridViewInsert);
lbNew.Click += new EventHandler(New_Button_On_Click);


}

but when i go to the second page, i cannot see the linkbutton in the footer row in the second page. Also when i come back to the first page, i cannot see the linkbutton in the footer row of template column. the datagrid is created at design time and not at runtime. Please help me in this issue and mail me if anybody can provide solution
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top