I have an aspx page that contains an asp.net grid created from codebehing and rendered on pageload. This acts as the header for a RadGrid that contains the detail. Both the grids are in separate pannel.
I am using iTextSharp to export both the grids into a pdf. I am using the code below to create a form dynamically and then rerender it into a pdf:
I am using iTextSharp to export both the grids into a pdf. I am using the code below to create a form dynamically and then rerender it into a pdf:
HtmlForm
form = new HtmlForm();
form.Controls.Add(MyRadGrid1);
StringWriter sw = new StringWriter();
HtmlTextWriter hTextWriter = new HtmlTextWriter(sw);
form.Controls[0].RenderControl(hTextWriter);
I am getting several errors during the 'form.Controls[0].RenderControl(hTextWriter)' .
This code is unable to render all the telerik controls in the RadGrid.
Is there any other way that this could be achieved? Should i look into other options that will be better than itextSharp ?
Thanks in advance.