i have a code for export to excel,in my gridview i set paging to dispaly no of records in pagecount. but in my export to excel it is not giving me entire records,insted it is showing me the same paging with 6 record.
my code:
string attachment = "attachment; filename=Contacts.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
// Create a form to contain the grid
HtmlForm frm = new HtmlForm();
GrdDynamicControls.AllowPaging = false;
GrdDynamicControls.Parent.Controls.Add(frm);
frm.Attributes["runat"] = "server";
frm.Controls.Add(GrdDynamicControls);
frm.RenderControl(htw);
//GridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
how to change /disable the paging to get all the records from my gridview
i have numbers in gridview as +9199.... but after exporting it is showing me in the format of 9.99....
how to pass the formatcells in numbers from here..