Posted on: 10/14/2014 4:19:22 PM | Views : 338

how can I add  back a control into a GridView template after the control has been removed from parent? this is my code for removing the control Note I need to do this when exporting to a PDF file from an ascx file.
using (HtmlTextWriter hw = new HtmlTextWriter(sw)) { Control parent = grd_Questions.Parent; Control radioid = null; int GridIndex = 0; Dictionary<Control,int>radioList = new Dictionary<Control,int>(); Dictionary<Control, int> textBoxList = new Dictionary<Control, int>(); if (parent != null) { GridIndex = parent.Controls.IndexOf(grd_Questions); parent.Controls.Remove(grd_Questions); foreach (GridViewRow _grid in grd_Questions.Rows) { Control r ...

Go to the complete details ...