In our webapplication, we've hierarchical grid (2 bands) which we want to export to PDF document using document exporter. We are able to export data, but all borders are not shown for grid in the pdf document. I tried to set cell style (border color, border width, border style) again before exporting to pdf. It does not work. Please help
Hello,
I was able to see all styles applied in PDF document when WebHierarchicalDataGrid is exported (PDF format). Please refer to the sample on a following link:
<http://samples.infragistics.com/2010.3/WebFeatureBrowser/contents.aspx?showCode=true&t=WebHierarchicalDataGrid/WebHierarchicalDataGrid_DocumentExport.aspx~srcview.aspx?path=~srcview.aspx?path=WebHierarchicalDataGrid/WebHierarchicalDataGrid_DocumentExport.src>
If the issue is still present, please provide me with version of NetAdvantage product you are using, approach you are taking to export data with markup of the page.
Hope this helps.
Thanks,
Bhadresh
My bad for not giving correct control names. We are using Infragistics 9.1. We are using ultrawebgrid (Version=9.1.20091.2040) with viewtype = "Hierarchical" to get the hierarchical datagrid view.For PDF document, we are using UltraWebGrid.DocumentExport (Version=9.1.20091.2040). I'll create sample application to give idea on implemetation. Based on the version and control information let me know if you can give any pointers.
Thanks for an update. I have attached a sample for you which uses ultraWebGrid ViewType="Hierarchical”. I was able to see styles exported when exporting grid as a PDF.
Run the sample on your machine and test using the steps you have provided. If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. I have tested the sample using Windows 7 and version 9.1.20091.2040of Net Advantage for .NET’s toolset, Visual Studio 2010, C#.NET, IE 8.
If this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send me a sample of your own that demonstrates the issue.
I have also found WebDocumentExporter which works with the WebDataGrid and WebHierarchicalDataGrid can export styles from external style sheets when using application styling.
This is documented in the help in the known issues section:
<http://help.infragistics.com/NetAdvantage/ASPNET/current/CLR4.0/?page=Known_Issues_Known_Issues.html>
When in the topic look for the section for the WebGridDocumentExporter and you will see the known issues with styles.
I am following up to see if you have any further questions with this matter. Update me if any further assistance needed.
Hi Bhadresh
I am facing the same issue in WebHierarchicalDataGrid - Document Export in PDF, here when I am exporting WebHierarchicalDataGrid data to pdf getting an error ig_res/Default' is a physical path, but a virtual path was expected, but the same is working for webdatagrid.
Please can you suggest what have to do?
Dear Bhadresh,
Both issues are solved with your suggestion. To correct border issue for grid I had to set
BorderCollapseDefault
="Separate" property in displaylayout. For second issue (to repeat header row for each data row), I followed your suggestion of adding row dynamically and then setting display property same as header row. This solution also worked and now grid display and PDF download is working as desired for me.
Thanks a lot for the help.
One possible approach to implement the functionality you described is to insert rows with same HeaderText of the columns. Review the below link that will give you more details on how to dynamically add a row:
<http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=2889>
You may insert rows with styles similar to header in order to get same look and feel.
Is it possible to repeat header from band[0] (in hierarchical webgrid) on every row of band[0]?
Hi Bhadresh,
I'm checking the suggestion which you've provided. Will get back to you with update in couple of days.
Pradnya