8/14/2025 5:26:28 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Export tab control datagrid to Excel
Posted: 15 Oct 08 8:53 AM
|
Hi
I am trying to export the data in a datagrid in my tab control but am getting an error about not having the datagrid in a form tag with runat=server. I can't add the form tag to the dataview is I can't have a form tag in the web page and the web control.
Has anyone attempted similar?
The code I am using is as follows:
Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.xls"); Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vn.xls"; System.IO.StringWriter stringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); dgBuyerDetails.RenderControl(htmlWriter); Response.Write(stringWriter.ToString()); Response.End();
- Tony |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|