Hi,
I am trying to export data and I am facing the speed problems.
It takes about 5 mins to export 40,000 rows of data including all fancy style theme
So I am thinking removing all the fancy style theme would solve this issue, but it seems like the following code is not working.
this.DisplayLayout.Appearance.Reset();
I've also tried to create a temporary UltraGrid and assign just datasource and it didn't work.
Is there other way to export just the data without any style?
Thank you.
You are a legend!
The line of code you have here:
this.DisplayLayout.Appearance.Reset();will simply reset just that one property, not ALL of the styling applied to the grid. To do that, you would have to essentially find and reset all of the Appearances you have applied to the grid and all of it's sub-objects. There's no silver bullet to do that. And you really don't want to do it in this way, anyway, because you don't want to affect the on-screen grid, only the export. I think what you want to do is something like this: this.ultraGridExcelExporter1.ExportFormattingOptions = Infragistics.Win.UltraWinGrid.ExcelExport.ExportFormattingOptions.None;
This will tell the exporter to exclude formatting/styling from being copied from the grid to the export layout. You could, of course, customize this to just exclude some of the more expensive option. I would imaging that "Cell" is probably the biggest performance hit.
You might also consider limiting the user to exporting some kind of filtered sub-set of the data, rather than all 40,000 rows. No human user is going to want to deal with a 40,000 row spreadsheet, anyway. :)
Hello,
Thank you for posting on our forums.
What library are you using to export, and in what format are you exporting. Assuming you export UltraGrid to excel, the UltraGridExcelExporter have events like BeginExport, where you can strip the grid you have from appearances slowing the operation without affecting the grid you use.
More information about it can be found in our documentation here.
Should you need further assistance, please let me know.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics