2
Answers

export parent child gridview in excel using c#

Sayli k

Sayli k

5y
1.7k
1
I am using store procedure for retriving data for both parent gridview as welll as child gridview,
 
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", "attachment;filename= = CustomerAging.xls");
Response.ContentEncoding = Encoding.UTF8;
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
gridCustomeraging.RenderControl(hw);
Response.Write(tw.ToString());
Response.End(); 
Answers (2)