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
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