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
140
Exporting to excel using UltraGridExcelExporter from a load a demand WinGrid
posted

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

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Shankar,

    shankarchandru said:
    Although I set up my ultraGrid.Datasource property to this ultraDatasource, I am not able to export it using ultraGridExcelExporter.

    Why not? What's the problem?

    If you are creating a WinGrid in code and it's never parented to a form, then my guess is that it's not working because the grid has no BindingContext and so it has no data. Try setting the grid's BindingContext to the same BindingContext as the "real" grid that you are displaying, or to the BindinginContext of the form.

Children