Hi,
Appreciate help to resolve my problem here: -
Infragistics.Win.UltraWinGrid.UltraGrid ulgexport = new Infragistics.Win.UltraWinGrid.UltraGrid();ulgexport.DataSource = _presenter.GetManufacturerInfo();ExcelExporter.Export(ulgexport, dlgExcelExport.FileName);
Why the data in excel file is blank even though the DataSource is assigned with data?
Thanks a lot
Thanks for the answer!
It works to me now.
If you are not adding the grid to the form, then you should make sure you are disposing it. Normally, the form handles the disposal of controls on itself, but that won't happen here.
Anyway, the form does not need to be visible on the form. You could add it to the form.Controls collection and that will give the grid a BindingContext which should make this work whether the grid is ever visible or not.
Another option would be to just grid.BindingContext to the form.BindingContext or even to a new BindingContext.
It works if the grid show up at the form.
But is there any alternative? because i do not need the grid to show up at form.
Thanks
Probably because the grid has not been shown yet. Try to add it to a form and show it.