Version

ExportEnding Event

Occurs before the export process has ended, but before the Word document is finalized.
Syntax
'Declaration
 
Public Event ExportEnding As EventHandler(Of ExportEndingEventArgs)
public event EventHandler<ExportEndingEventArgs> ExportEnding
Event Data

The event handler receives an argument of type ExportEndingEventArgs containing data related to this event. The following ExportEndingEventArgs properties provide information specific to this event.

PropertyDescription
Canceled True if the exporting process was cancelled.
WordDocumentWriter Returns a reference to the WordDocumentWriter which is writing the grid into the destination.
Remarks

The ExportEndingEventArgs.Canceled argument is True if the exporting process was cancelled.

The ExportEnding event is invoked when the export process has completed to give the developer one final opportunity to manipulate the Word Document being generated. This is particularly important when using an overload of the Export method that takes a filename as the file will be saved after the ExportEnding is complete but before the ExportEnded so it will not be possible to make changes to the document after the ExportEnding event has fired. Also, since the file will not have been created until after the ExportEnding event fires, the file cannot be accessed until the ExportingEnded event.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also