RadGrid.RenderControl()

6 posts, 0 answers
  1. Tim
    Tim avatar
    54 posts
    Member since:
    Apr 2007

    Posted 18 May 2008 Link to this post

    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?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 May 2008 Link to this post

    Hi Tim,

    Go through the following help document link.
    Column types

    Princy.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Officialboss
    Officialboss avatar
    43 posts
    Member since:
    Jan 2008

    Posted 27 Jun 2008 Link to this post

    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.
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 30 Jun 2008 Link to this post

    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
  6. Vanishree
    Vanishree avatar
    1 posts
    Member since:
    Jul 2008

    Posted 18 Jul 2008 Link to this post

    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
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 18 Jul 2008 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017