or
I have a RadGrid on an aspx page with a HTML table above it with some customer information. I am able to export the HTML table and prepend it to the export by using a memory stream. But, I cannot get it to work when exporting to PDF.
protected void RadGrid1_GridExporting(object source, GridExportingArgs e) { StringBuilder customHTML = new StringBuilder(); if (e.ExportType == ExportType.Excel) { customHTML.Append("<table style='font-size: 11px; font-family:Verdana;width:500px;' >"); customHTML.Append("<tr><td><strong>Volunteer:</strong></td><td style=text-align:left;>" + _volunteer + "</td></tr>"); customHTML.Append("</table>"); e.ExportOutput = e.ExportOutput.Replace("<body>", String.Format("<body>{0}", customHTML)); MemoryStream gridMemoryStream = new MemoryStream(new ASCIIEncoding().GetBytes(e.ExportOutput)); gridMemoryStream.Close(); } if (e.ExportType == ExportType.Pdf) { // How do I add HTML to the PDF Export? The Excel Export doesn't work }
function SessionExpired() {var oManager = GetRadWindowManager();oManager.closeAll();var requestString = "<%= ResolveClientUrl("~/SessionExpired.aspx") %>";var oWnd = window.radopen(requestString, "SessionExpired");oWnd.set_modal(true); oWnd.setSize(513, 230);oWnd.center();oWnd.add_close(OnClientCloseSession); }<telerik:RadComboBox ID="contractNumber" runat="server" Width="165px" Height="150px"
CssClass="form" AllowCustomText="true" MarkFirstMatch="true" EmptyMessage="Search (5 characters min)*" EnableLoadOnDemand="true" EnableItemCaching="true" IsCaseSensitive="false" MinFilterLength="5" EnableOverlay="true" OnItemsRequested="ContractNumber_ItemRequested" DataTextField="Key" OnClientBlur="" DataValueField="Value"></telerik:RadComboBox>function returnToParent(){ //create the argument that will be returned to the parent page var oArg = new Object(); if ($find("<%= contractNumber.ClientID %>").get_value()) oArg.contractNumber = $find("<%= contractNumber.ClientID %>").get_value(); //Close the RadWindow and send the argument to the parent page if (oArg.contractNumber) { var oWnd = GetRadWindow(); oWnd.close(oArg); } else alert("Please provide a contract number or a system ID");}
