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

Keep getting Null Reference when exporting grid to Excel

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

2 Replies

BE Becky 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.


VN Vignesh Natarajan Syncfusion Team 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. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon