Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
.export .... S-L-O-W and timing out
posted

I have a 3G proscessor with 512K of Ram running Studio 2k5. When I do a "UltraWebGridDocumentExporter1.Export(UltraWebGrid1);" it times out completely and slows my machine down to a crawl for several minutes after I try to run the code of it. I have a 39 column grid that eventuall will have several thousand rows, however currently Im only trying to print the first two using the following code in a button click event. What am I missing here that is making it sooo s-l-o-w?

Code: 

UltraWebGrid1.Rows.Clear();

UltraWebGrid1.DisplayLayout.RowsRange = 2;

UltraWebGrid1.DataBind();

UltraWebGridDocumentExporter1.Export(UltraWebGrid1);

Parents
No Data
Reply
  • 19308
    posted

    Rather than using the RowsRange property, I would recommend limiting the data that you bind to the grid through your datasource, and then call Export.  The RowsRange property is really only meant for the AJAX implementation on the client-side to determine the batch size of rows that should be loaded when more data is requested.  When working with the Exporter, it will try to get all of the grid data that is availalbe, which includes rows outside of the RowsRange. 

    What I've done in the past is construct a dataset or collection explicity for the grid when I want to export it to Excel.  Give that a try and let me know how it works.  I will warn that as you scale the data up, the export process will take longer simply because of the number of objects being created.  There may be some room for improvement here, I'll be sure to send a note to the development team about that. 

    As a last resort, there is an entire ExcelEngine that can be used to construct a worksheet from scratch (without exporting a grid).  Since you would basically be writing a tight loop from your datasource to the ExcelEngine, you should be able to dramatically improve performance. 

    You can look at the help for some guidance on using the ExcelEngine - http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Infragistics2.Excel.v7.3~Infragistics.Excel.Workbook.html

    Hope this helps,

    -Tony

Children