We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Keep getting Null Reference when exporting grid to Excel

Thread ID:





144335 Apr 30,2019 08:31 PM UTC May 2,2019 08:28 AM UTC ASP.NET MVC 2
Tags: Grid
Asked On April 30, 2019 08:31 PM UTC

I have created and attached a test project of the syncfusion grid
what is null?
Is it my grid properties?
Is it the way im passing the data to the grid?

I could really use some help as ive been messing with this for 3 days

ps. i'm about to die lol

Attachment: SyncFusionTestProj_376f9c8.zip

Replied On April 30, 2019 08:32 PM UTC

This is actually EJ 1 
I am calling a post at renderGrid.js
and instantiating the grid there.

Vignesh Natarajan [Syncfusion]
Replied On May 2, 2019 08:28 AM UTC

Hi Nicholas, 

Thanks for contacting Syncfusion support. We are happy assist you. 

Query: Keep getting Null Reference when exporting grid to Excel 

We are able to reproduce the reported issue in the shared sample, and after validating the sample we could see that you have exported the Grid with dataSource in form of dictionary object instead of list of objects. DataSource for the Grid can be in form of list of objects / dataTable etc. but not dictionary object. So to export the Grid kindly serialize the dictionary object to model class and export it in form of list of objects / datatable.   

Or if you want to export without model class then kindly use TypeBuilder concept. Refer the below knowledge base documentation to export the Grid using TypeBuilder. 

If you are facing any issue while applying above solution, please get back to us with more details. 

Vignesh Natarajan. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon