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. (Last updated on: June 24, 2019).
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:

Created:

Updated:

Platform:

Replies:

144335 Apr 30,2019 08:31 PM UTC May 2,2019 08:28 AM UTC ASP.NET MVC 2
loading
Tags: Grid
Nicholas
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

Nicholas
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. 

Regards, 
Vignesh Natarajan. 
 


CONFIRMATION

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