HighTechTalks DotNet Forums  

dato from grid into Excel

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss dato from grid into Excel in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
anonymous
 
Posts: n/a

Default dato from grid into Excel - 06-23-2004 , 10:19 AM






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()

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.