Hello,
I encounter the next error: Object reference not set to an instance of an object.
The stack trace:
...
at Syncfusion.GridExcelConverter.GridExcelConverterControl.GridCellToExcel(GridModel grid, Int32 iRow, Int32 iColumn, IRange range)
at Syncfusion.GridExcelConverter.GridExcelConverterControl.GridToExcel(GridModel grid, IWorksheet sheet, ConverterOptions options)
After investigations, I've saw that ActiveGridView property is null.
We construct the model for exporting in the next way:
...
GridControl gridValues;
var s = new MemoryStream();
gridValues.SaveBinary(s); // public void SaveBinary(Stream s); => Assembly Syncfusion.Grid.Windows, Version=16.2451.0.41
s.Seek(0, SeekOrigin.Begin);
var gridTemp = new CustomGridControl(GridModel.LoadBinary(s)); // public class CustomGridControl : Syncfusion.Windows.Forms.Grid.GridControl
// gridTemp.ActiveGridView is null after this step and crashes the excel export.
s.Close();
... => some transformations/aggregations and return gridTemp
As a mention, the ActiveGridView have the next attribute: [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] .
I have changed the version of libraries some time ago, and right now i have all syncfusion dll's at version 16.2451.0.41 .
Can you please tell me how to proceed and set properly this property ?
Have a good day,
Mihai