NullReferenceException on the Excel export if grid is grouped

Hi,

I try to export the data of a grid which is currently grouped by a column. But on the export a NullReferenceException occur.
I guess it depends on my data, because in a simple example it works.

The Grid use the a CustomDataAdaptor.

In the attachments I collected all data... maybe you can find the issue.

Thanks for your help.

Attachment: GridExport_grouped_76c0c0c6.zip

5 Replies 1 reply marked as answer

UN Unknown February 3, 2021 07:55 AM UTC

Hallo, is there any new information for me?


JP Jeevakanth Palaniappan Syncfusion Team February 3, 2021 11:42 AM UTC

Hi Nils, 

Sorry for the delay in getting back to you. 

We have checked your sample but we are unable to run the provided sample due to dependency issues. So we have checked the issue in grid with grouping handled in the custom adaptor sample. In this, we are unable to reproduce the reported issue. So kindly provide us the following details to proceed further, 

  1. Share us the Syncfusion NuGet version details.
  2. Kindly provide us a simple runnable issue reproducing sample or reproduce the issue in the provided sample.

The above requested details will be helpful for us to validate the issue and provide you with a better solution as early as possible. 


Regards, 
Jeevakanth SP. 



UN Unknown February 4, 2021 10:05 AM UTC

Hi,

I use net5.0 and the Syncfusion version 18.4.41.
In the attachments you find a runnable code and a video.

Best regards.

Attachment: Archive_8b1c971f.zip


JP Jeevakanth Palaniappan Syncfusion Team February 5, 2021 01:41 PM UTC

Hi Nils, 

Thanks for providing the runnable sample. 

We have validated your query and we are able to reproduce the reported problem from our end. We have considered this as a bug and logged a defect report “Exception throws on excel exporting in grouped grid when Group caption template is defined in grid” for the same. We will update the issue fix timeline on Feb 8, 2021. 

Till then we suggest you to define the ExcelGroupCaptionTemplateInfo event in GridEvents as a work around to resolve the exception. 

Please find the code snippet and the sample for your reference. 

HQGrid.razor 
<GridEvents TValue="ProjectWithCustomFieldsDto" 
ExcelGroupCaptionTemplateInfo="GroupCaptionTemplate"> 
</GridEvents> 
 
@code{ 
 
public void GroupCaptionTemplate(ExcelCaptionTemplateArgs args) { 
    args.Cell.Value = "caption template data"; 
} 
 
} 


Regards, 
Jeevakanth SP. 


Marked as answer

JP Jeevakanth Palaniappan Syncfusion Team February 5, 2021 01:50 PM UTC

Hi Nils, 

As we said earlier, we have considered your query as a bug and logged the defect report “Exception throws on excel exporting in grouped grid when Group caption template is defined in grid for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming patch release which is expected to be rolled out by the mid of March 2021. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.     
 
 
Until then we suggest you to use the workaround which we suggested earlier to resolve your issue. 
 
Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon