dato from grid into Excel

A

anonymous

I have the following code where I get all data into
excel. However my grid has a paging option set to 'Y'
and with the paging it is not working.
What should be modified in order to fix this problem?
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-
Disposition", "inline;filename=test.xls")
Response.Charset = ""
Me.EnableViewState = False
grdReport.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top