Hi
1) When exporting a wingrid to pdf it applys what ever style the grid is set to to the export. How can i remove the style during exporting to pdf?
i can just set this do this at the time of exporting grid.useAppStyle = FALSE and then set it to true when im done but this creates a flicker... which i dont want.
Is there any way to remove the style during exporting? Im exporting to pdf through a click of a button ie: creating a report with sections,header and footer.
2) How can i export to excel through the click of a button and not use the export events as above?...
No, as I said... they export by default. You could stop them from exporting using the HeaderExporting event or by modifying the Export Layout in the InitializeLayout event of the UltraGridExcelExporter. But if the headers display on the screen, they will export by default unless you explicitly do something to turn them off.
Is there a property i could set to make sure that the column headers export?
Hi,
1) Since UseAppStying is a property on the grid, there's no way to turn off styling just for the export and not on the on-screen grid. But one option would be to copy the grid and export the copy. So you would create a grid in code, add it to the Controls collection of the form so it has a BindingContext, bind it to the same data source as your real grid, and perhaps also copy the DisplayLayout from the real grid to the copy. You could turn off AppStyling on the copy and then export the copy.
2) I'm not sure I understand your question. The export should look just like the grid on-screen. So if the column headers are missing, something is clearly wrong. Either you are doing something in the code to remove them from the export, or else this is a bug in whatever version of the controls you are using.
for option 2 of the above im using the following code.
exporter:Export(grid,"Reportname.xls",Infragistics.Excel.WorkbookFormat:Excel97To2003).
But it does not include my column headers?? any ideas?