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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exporting to Excel causes an exception while deserializing GridProperties

Thread ID:





131992 Aug 7,2017 04:14 PM UTC Aug 8,2017 12:31 PM UTC ASP.NET MVC 1
Tags: Grid
Asked On August 7, 2017 04:14 PM UTC

I have code that is dealing with exporting a Grid control to Excel. Within the grid is a checkbox that's used for selecting specific rows. If I check a few rows and try to export I get an InvalidOperationException thrown when trying to deserialize the grid model JSON to a GridProperties object. The field that causes the exception is named CurrentIndex and it's type is int but the JSON has an array of ints in that field. To me this feels like an issue with the GridProperties class not matching the JavaScript model. What can be done to fix this issue?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On August 8, 2017 12:31 PM UTC

Hi Andrew, 

Thanks for contacting Syncfusion support. 

We created a sample and in this sample we set column type as checkbox used for selecting specific rows. Once we check a few rows and export to excel we did not face any exception in our sample.  

Find the code example and sample:  

        .ToolbarSettings(toolBar => toolBar.ShowToolbar().ToolbarItems(items => 
        .Columns(col => 
            col.Field("OrderID").HeaderText("Order ID").TextAlign(TextAlign.Right).Width(75).Add(); 

To find out the root cause, we need the following details. 

1. Share the code example of Grid and controller. 

2. Have you mentioned field property for the checkbox column? 

3. Share the screenshot and stackrace of an exception. 

4. Essential Studio Version details.  

5. If possible, replicate the issue in the attached sample.  

Prasanna Kumar N.S.V 


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