[NullReferenceException: Object reference not set to an instance of an object.]
Syncfusion.EJ.Export.GridExcelExport.Export(GridProperties gridModel, Object dataSource, Boolean multipleExport) +101
Syncfusion.EJ.Export.ExcelExport.Export(GridProperties gridmaodel, Object datasource, String excelname, ExcelVersion excelversion, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, String theme, Boolean multipleExport) +104
Syncfusion.EJ.Export.ExcelExport.Export(GridProperties gridmaodel, IEnumerable datasource, String excelname, ExcelVersion excelversion, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, String theme, Boolean multipleExport) +35
Shared.ExportSyncFusionGrid.ExportToExcel(IEnumerable rows, GridProperties gridProperties, String fileName) in ExportSyncFusionGrid.cs:133
Controllers.<ExportExitTradesToExcel>d__19.MoveNext() in BacktestResultController.cs:520
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +97
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult) +17
Here is the calling code:Line 132: var exp = new ExcelExport();
Line 133: exp.Export(gridProperties, rows, fileName, ExcelVersion.Excel2010, false, false, "default-theme", false);
And the javascript code that calls the controller (I am passing an additonal parameter):
function onExitTradesToolbarClick(args) {
switch (args.itemName) {
case "Excel Export":
this.export(settings.exportExitTradesToExcelUrl + "/" + currentBacktestResultId);
args.cancel = true;
break;
default:
this.refreshContent();
break;
}
}
I am using the latest version of Syncfusion on Windows 10.
Regards, Jeff