Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1725
When is the InitializeLayout event with IsExportLayout=true called?
posted

I have a grid that I'm trying to export to a PDF file. For the exported PDF I want to apply a different layout to the grid during export. To do this I planned on adding logic to the grid InitializeLayout that would check for the flag and apply the proper layout properties.

My question is when/how is the InitializedLayout event triggered here. I was expecting that the Export method or something after the BeginExport would trigger a new InitializeLayout but that does not appear to be the case.

My current code to do the export looks like ...

...do some stuff

 

 

 

 

 

 

 

Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter tableExporter = new Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter

();

 

 

tableExporter.BeginExport += new EventHandler<Infragistics.Win.UltraWinGrid.DocumentExport.BeginExportEventArgs>(tableExporter_BeginExport

);

 

 

tableExporter.CellExported += new EventHandler<Infragistics.Win.UltraWinGrid.DocumentExport.CellExportedEventArgs>(tableExporter_CellExported

);

 

 

tableExporter.EndExport += new EventHandler<Infragistics.Win.UltraWinGrid.DocumentExport.EndExportEventArgs>(tableExporter_EndExport

);

 

 

tableExporter.RowExporting += new EventHandler<Infragistics.Win.UltraWinGrid.DocumentExport.RowExportingEventArgs>(tableExporter_RowExporting

);

 

 

 

tableExporter.Export(reportGrid, report);

... clean up

I also have a BeginExport event handler that adds a standard header/footer and page numbers and then returns. Perhaps there is something I should be doing in the BeginExport handler to trigger what I need.

Thanks

Neil