'Declaration Public Event AsynchronousExportError As EventHandler(Of AsynchronousExportErrorEventArgs)
public event EventHandler<AsynchronousExportErrorEventArgs> AsynchronousExportError
The event handler receives an argument of type AsynchronousExportErrorEventArgs containing data related to this event. The following AsynchronousExportErrorEventArgs properties provide information specific to this event.
Property | Description |
---|---|
DisplayErrorMessage | Gets or sets whether an error dialog will be displayed by the UltraGridExcelExporter. |
Exception | The exception that occurred during the asynchronous export process, or null if the error was not caused by an exception. |
FileName | The filename specified to the AsynchExport method. |
Report | Exporting report. |
This event fires when an error or exception occurs during an asynchronous export operation. For example, if you attempt to export to a file and the file is locked and cannot be overwritten.
By default, the UltraGridExcelExporter will display an error message and the export process will be cancelled. Setting DisplayErrorMessage to false will cancel the default error message so that you can display your own, or re-try saveing the Workbook to a different filename.
Note that this event will only fire for asynchronous export operations. For synchonrous operations, exceptions can be caught by wrapping the call to the Export method in a try...catch block.
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