0

I need to export a same Infragistics DataGrid twice and update progress bar during the export. So i'm starting first export like this

excelExporter.ExportAsync(_xamDataGrid, "excelFile", WorkbookFormat.Excel97To2003);

the problem is that I cannot start the second export for this grid until the first one is finished.

Is there any way to wait till the end of this async operation before starting the second one?

Handling the ExportEnded event does not solves the problem, as here excelExporter has the property IsExporting=true.

excelExporter is of type DataPresenterExcelExporter.

Danko Valkov
  • 1,038
  • 8
  • 17
fedotoves
  • 757
  • 6
  • 7
  • Why do you need to export it twice? Perhaps you should export it once and then copy the file. – roken May 11 '12 at 17:05
  • I need to separate one grid to 2 separate Excel workbooks. It is easier to Export a grid twice with some conditions, that to export to one file and then cut some rows from Excel file to another Excel file. – fedotoves May 12 '12 at 06:23
  • 2
    You could perform a **BeginInvoke** from within the **ExportEnded** event. – AndrewS May 14 '12 at 14:13

0 Answers0