this.ultraGridWordWriter1.ExportAsync(this.ultraGrid1, "C:\\Reports\\WordExport.doc");
The WinGridWordWriter™ component enables you to asynchronously export your entire WinGrid™ directly into a Microsoft Word document. You do this by calling the ExportAsync method of the UltraGridWordWriter object.
Asynchronous exporting, as opposed to synchronous, allows users to interact with the user interface of the application while the export process is executing. You must ensure that neither the WinGrid, nor its data source is accessed by your application in any way while the asynchronous export is in progress. The IsExportAsyncInProgress property of the WinGrid can be used to determine whether or not the asynchronous export is still in progress to avoid any access conflicts.
A Microsoft Visual Studio solution using .NET Framework 3.0 or higher
A Windows Forms Application Solution using the WinGrid and bound to data
A WinGridWordWriter control on the form
Export the WinGrid Asynchronously
In C#:
this.ultraGridWordWriter1.ExportAsync(this.ultraGrid1, "C:\\Reports\\WordExport.doc");
In Visual Basic:
Me.UltraGridWordWriter1.ExportAsync(Me.UltraGrid1, "C:\Reports\WordExport.doc")
(Optional) Verify the resultsTo verify the result, run your application and perform the export (Figure 1).
Figure 1: WinGrid asynchronously exporting to a Microsoft Word document