I want to Export grid view data into pdf but only Header & Footer Description is coming.
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=GridViewExport.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter swr = new StringWriter();
HtmlTextWriter htmlwr = new HtmlTextWriter(swr);
grdReports.AllowPaging = false;
BindgrvReports();
grdReports.RenderControl(htmlwr);
StringReader srr = new StringReader(swr.ToString());
Document pdfdoc = new Document(PageSize.A2, 10f, 10f, 10f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfdoc);
PdfWriter.GetInstance(pdfdoc, Response.OutputStream);
pdfdoc.Open();
htmlparser.Parse(srr);
pdfdoc.Close();
Response.Write(pdfdoc);
Response.End();