Hi
I have a grid with only a few rows (<50) and approx 60 columns. When I try to export it as PDF or XPS it takes almost 2 minutes to complete.
What is the proper way of doing this? I want to utilize a background thread since I will have 1000s of rows in real life.
Any samples (for background thread) are appreciated.
Regards
2 minutes for 50 rows seems pretty excessive. One thing you might want to try is setting the Visual Studio IDE to break on all run-time exceptions and see if any exceptions are getting raised and handled internally.
Using a separate thread is pretty tricky. The UltraGridDocumentExporter is constantly reading properties and data from the grid and the data source. So you would almost certainly run into serious problems if you tried to use a separate thread to export the grid which is on the UI thread. The only really safe way to do something like this would be to create a grid, a DocumentExporter, and a copy of the data source onto the thread and then do the export on the second thread so that the export does not reference anything on the UI thread.
Of course, copying the data source and the grid layout could cause more of a delay than you have now.