Hi,
I am using Infragistics v8.2
Issue: When Exporting Ultrawebgrid to PDF i am getting one error like this
'/MyApplication/WebResource.axd?d=0OvaBzWedBe5DVsmUEiun0ptzBzkiEDIJEc0D-xnRNzM-r04xHi-vgwCBzf-EtOtOLXQrknP9-8P0RxRmaCi1A2&t=633398816440000000' is not a valid virtual path
and the code i had used is
exp.ExportMode = Infragistics.WebUI.UltraWebGrid.Exporter.ExportMode.Download;
exp.Export(ultrawebgrid1);
instead of this i had used DocumentExporter control then also i am getting same issue
Please help me .....
Thanks, regards
Sivaprasad
Try to add the exporter as a Global variable of the form and create and add it from the CreateChildControls or CreateControls event of the form... I am working with Web Parts and I have to override the RenderControl event of the form, if you do this too be sure you are render the Exporter control in this event.
protected override void CreateChildControls() { base.CreateChildControls();
excelExporter = new UltraWebGridExcelExporter("ExcelExporter"); this.Controls.Add(excelExporter);
}
public override void RenderControl(HtmlTextWriter writer) { this.excelExporter.RenderControl(writer);
Sivaprasad,
I had a similar issue with the PDF export. It turns out in my case it was related to the path of a CSS file in the master page. It seems the exporter cannot resolve the path although it works fine in the app.
I changed mine so that the path is resolved and this exporter works fine now. A sample of the pathing is below. The key is the Page.ResolveUrl
<link href="<%= Page.ResolveUrl("~")%>style/appstyle.css" rel="stylesheet" type="text/css" />
HTH
Brad
You added the exporter to the Controls collection of the page. Try adding it to the Controls collection of the form instead:
this.Form1.Controls.Add(exp);
If you still get the error when you add the WebGridDocumentExporter to the form's Controls collection in code, then this may be a bug - or there may be something specific about the application setup where an error like this would be expected. Can you reproduce this in an isolated sample application? If so, please submit a support request so that a Developer Support Engineer can investigate this further.
What happens if you have the WebGridDocumentExporter added to your page at design-time, rather than at run-time?
Hi Vince,
I added control to the page before Calling Export() method.
Infragistics.WebUI.UltraWebGrid.DocumentExport.UltraWebGridDocumentExporter exp = new Infragistics.WebUI.UltraWebGrid.DocumentExport.UltraWebGridDocumentExporter();
exp.Format = Infragistics.Documents.Report.FileFormat.PDF;exp.DownloadName = "Reportname";
this.Page.Controls.Add(exp);
but still i am getting issue
I want to know Is there any other way to Export Ultrawebgrid to PDF?
Please Help me...
Since you're dynamically creating your WebGridDocumentExporter control, try adding it to your page after you create it but before you call its Export() method: