Home Forums WinForms controls Xceed Grid for WinForms CellDataFormat in ExcelExporter Reply To: CellDataFormat in ExcelExporter

User (Old forums)
Member
Post count: 23064

Hi again.

Suspect the problem arises when a cell has data bound to it which is of Nullable type. If any of the bound data in this scenario is null then an exception occurs. For example, I iterate through a List of Nullable<int>. For each of these I add a new DataRow to my GridControl and populate a Cell in that DataRow with the value from my current Nullable<int>. If this value is null then the problem seems to occur during export.

The missing inner exception details which are being published when the exception “An exception occurred during exporting” is thrown should be reproduced by doing the above. I would be willing to bet that the inner exception is “Object reference not set to an instance of an object.” though.

Hope this helps fixing the problem.

Imported from legacy forums. Posted by matt (had 422 views)