Hello,
We are using UltraWebGrids and allow our end users to export the grids to PDF. The contents of the grid is generated by the user selecting various parameters and then refreshing the grid in the browser. When we export it to PDF, we want to be able to include some text that says what parameter values the user had selected, which generated the data as such. We would also like to be able to include a page header with text of our choosing. I cannot see any method of including a page header, however.
The only thing I can come up with is modifying the grid rows/cells and inserting a few rows at the top of the grid, but this is not ideal because they appear just after the header row. I could live with it if there was just a way to insert rows above the header row, even though it would not be a true "page" header.
Here is some sample code we are using to generate the PDF from the grid. In this sample code I am inserting a row with "some test text" which is not ideal because it appears below the header row, even though my code says to insert it at index 0. Here's my code:
Dim obj As New Infragistics.WebUI.UltraWebGrid.DocumentExport.UltraWebGridDocumentExporterDim bytData() As Byte
Dim objMS As New System.IO.MemoryStream
'not great, it puts a row under the headers.Dim objRow As New Infragistics.WebUI.UltraWebGrid.UltraGridRowDim objCell As New Infragistics.WebUI.UltraWebGrid.UltraGridCellobjCell.Value = "some test text."objCell.ColSpan = 10objRow.Cells.Add(objCell)_Grid.Rows.Insert(0, objRow, True)
obj.ExportMode = Infragistics.WebUI.UltraWebGrid.Exporter.ExportMode.Downloadobj.Format = Infragistics.Documents.Reports.Report.FileFormat.PDFobj.DownloadName = Filename
obj.TargetPaperOrientation = intOrientationobj.Export(_Grid, objMS, True)bytData = objMS.ToArray()
Response.Clear()Response.ClearHeaders()Response.ContentType = "application/PDF"Response.AddHeader("Pragma", "public")Response.AddHeader("Expires", "0")Response.AddHeader("Content-Disposition", "inline; filename=" & Filename)Response.BinaryWrite(bytData)Response.End()
Any ideas here?
Hello autharch,
This is an initial update to let you know that I have received your support request and will be looking into this matter for you.
I will follow-up with you regarding the status of this matter on or before Wednesday.
Thank you.
I am continuing to look into this for you. I will update you again on the status of the progress on or before Monday.
Hi autharch,
I have created a private support case for you to further address this matter. Please see your private support case for updates.