hi,
I try to load nearly a million records to my data structure and page those records using ultrawinGrid only 1000 at a time. This helps me avoid System.OutOfMemory exceptions which could cause otherwise trying to load them directly to an ultrawingrid.
But I have a functionality to export this grid (the entire pages and not 1000 pages alone) to excel. In order to achieve this, I programatically create an ultraWinGrid, and use an ultraDatasource to point to my already loaded data structure. Although I set up my ultraGrid.Datasource property to this ultraDatasource, I am not able to export it using ultraGridExcelExporter. Should I call InitializeRow on all the rows in the programatically created ultrawinGrid?
Thanks for the help in advance.
Shankar
Hi Hardik,
What version of the Infragistics controls are you using? Infragistics2 just means that the assemblies are built against CLR2. So I don't know what version you are using. If you are saying you are using NetAdvantage 2.0, then no, that version was released long before Excel2007 existed and therefore it cannot possibly support exporting to Excel2007 format. That feature could not possibly have been added before version 7 or maybe even later.
Hi,
Is there any way to export to 2007 format(.xlsx) by using infragistics2 and CLR 2.
because i told to upgrade my application which export the reports in 2007 format.but when i have tried by adding the extension it is throwing me an error.
Regards,
Hardik
I'm a little confused by your question. As far as I know, exporting to Excel2007 or higher format requires CLR3 or higher. Otherwise, you would have to write your own compression class and provide it to the export method. So I'm not sure how you could be exporting at all.
Hi Friends,
I am using Infragestics2 with .net framework 2.0.
I am using the Export functionality which is working fine for .xls format (2003) But i want to add support for the .xlsx (2007/2010) too.
I have tried to add the extension .xlsx but it is throwing error saying "Excel cannot open the file because the file format or file extension is not valid.varify that the file has not been corrupted and that the file extension matches the format of the file.
Any Idea ?
Please help.
When you export the grid, the grid creates a clone of it's DisplayLayout along with a clone of the rows collection. This allows you to modify the export layout or the export rows without modifying the on-screen grid.
The exporter expands all of the cloned rows, on the assumption that you want to export all of the grid rows, and that the export should not be based on the current expanded state of a row on the screen.
I think what you can do is trap the InitializeRow event on the UltraGridExcelExporter and set e.SkipDescendants to true for any parent row whose children you do not want to export.