Hi there,
I am currently using Infragistics4.Web.v12.2, Version=12.2.20122.2054.
I want to export a webdatagrid to a word document, with my custom css style classes applied.
I can export the grid successfully and I have set the wordExporter.EnableStylesExport = True in the code behind.
I also handle the webWordExporter.RowExported event. Should the styles be applied during the Exporting event?
However, the grid only exports with the default IG stylesheet.
Am I missing something, or is this currently supported?
Regards.
Hello,
I want to let you know that I have received your questions here and will be looking into this for you. I will have an update for you on this post on or before Tuesday.
Thanks!
Hi JJB,
When setting EnableStylesExport to 'true' the styles that are applied to the grid when exporting to MS Word should export as well. I have tested this and find that this is not working as expected. I have logged this with our engineers with a development issue id #137968.
JJB, I have created a private support case for you for further follow-up details.
Thanks for reporting this.
Hi Karen,
This is to document for the benefit of the Infragistics Community, that this has been submitted as a Development Issue with id #140462. Our engineers are looking at this issue and I will update you once their review has completed.
Thank you Karen!
Hi Alan,
No, I don't have a demo at this time. When I EnableStylesExport, it does export the css that tied to the grid (within ig_res), but leaves out the custom styling applied on InitializeRow. So the header, text and alternate row styles get exported but it leaves out the rest.
Thanks,
Karen
Karen,
Do you have an example that shows this not working that is using styles in the same way that you are in your application that we can look at and see what is happening?
Hi Troy,
I didn't realize until this morning that this thread was regarding exporting to MS Word. I thought it was the export to Excel. I still tried what you suggested, but it doesn't work. I have a workaround for applying yellow background to a row within the RowExporting event. I added a hidden column that holds a true/false value that indicates whether or not to apply the style. But I also need to apply specific styling to an individual cell and I'm having issues with that. Is there another forum post that you're aware of addressing the styling when exporting to Excel? I have yet to find one that resolves the issue.
Hi Tom,
Your case is actively being looked into and will responded to on the support case. Thank you for your patience as we research your matter further.