I have a checkout page that has a RadGrid on it to display items, cost, amount of each item etc. When I used the native MS datagrid, I was able to use DataGrid.RenderControl() to get the html to display an exact replica of the datagrid in an email. For some reason this will not work with the RadGrid.
This is the code I used:
StringBuilder
sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter htw = new HtmlTextWriter(sw);
dg.RenderControl(htw);
I get a RegisterScript() error when I use this same code with the RadGrid. Ideas/Solutions?
5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 19 May 2008, 12:15 PM
0
Officialboss
Top achievements
Rank 1
answered on 27 Jun 2008, 06:52 PM
I was also looking for the same thing, render the html of the RadGrid. I was not able to find what you were referring to. Could you please point me to code that does the rendering of the RadGrid.
Thanks.
Thanks.
0
Hi Howard,
Is exporting the grid content to Word/Excel/CSV or PDF and then attaching the file to an email a feasible solution for your case? See the Exporting section from the online demos of the product for more details:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Overview/DefaultCS.aspx
Basically, the RenderControl() method might work for simple controls like buttons or ASP Menu, however we do not recommend using this approach to output the grid content because this may require custom approach/workaround as discussed in these resources:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=118285
http://www.codeproject.com/KB/aspnet/ASPNet_11_Grid.aspx
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Is exporting the grid content to Word/Excel/CSV or PDF and then attaching the file to an email a feasible solution for your case? See the Exporting section from the online demos of the product for more details:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Overview/DefaultCS.aspx
Basically, the RenderControl() method might work for simple controls like buttons or ASP Menu, however we do not recommend using this approach to output the grid content because this may require custom approach/workaround as discussed in these resources:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=118285
http://www.codeproject.com/KB/aspnet/ASPNet_11_Grid.aspx
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Vanishree
Top achievements
Rank 1
answered on 18 Jul 2008, 07:42 AM
We have requirement to render the datagrid contorl to HTML output. We are unable to do the same with RadGrid.
This requirement is very much essential for us.
Please let us know how to do this.
Thanks
Vanishree KS
This requirement is very much essential for us.
Please let us know how to do this.
Thanks
Vanishree KS
0
Hi Vanishree,
Have you reviewed the resources linked at the bottom of my previous post? However, keep in mind that we do not recommend them since they require some custom coding/workarounds that may not cover all possible scenarios.
Kind regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Have you reviewed the resources linked at the bottom of my previous post? However, keep in mind that we do not recommend them since they require some custom coding/workarounds that may not cover all possible scenarios.
Kind regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center