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
225
I get an empty Excel spreadsheet if I create the ultragrid in code. Any ideas?
posted

 

 

 

 

Example code:

UltraGrid ug = new UltraGrid();
ug.DataSource = dt;
UltraGridExcelExporter ux = new UltraGridExcelExporter();
ux.Export(ug, "C:\\Temp\\ExportGrids\\x.xls");

 

Parents
  • 37774
    Verified Answer
    posted

    Try adding "ug.BindingContext = new BindingContext()".  The grid won't be able to get any data through the .NET BindingManager without a binding context (which it usually acquires from its parent, usually a form or user control).

    -Matt

Reply Children
No Data