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
close icon

Grid to excel problem

Hi

I have written two methods for exporting grid to excel.

in first one I have created my own custom class inheriting GridExcelConverterBase class.

in the second method i simply initilize an object of GridExcelConverter and call its gridToExcel method.

they both work fine but when I used any method and export the grid to excel, then other method starts to throw an exception
"type initilizer threw an exception".

and it is true for both side i.e. the method called first will work fine, and other one will start throwing exception.

sample solution is attached,
thanks syncfusion...
regards,
Alia

sampleTry.zip

3 Replies

RA Rajagopal Syncfusion Team August 29, 2007 04:57 AM UTC

Hi Alia,

Thanks for your interest in Syncfusion Products.

When a class initializer fails to initialize a type, a TypeInitializationException is created and passed a reference to the exception thrown by the type's class initializer. The InnerException property of TypeInitializationException will hold information on the underlying exception. Please take a look at the InnerException property of the TypeInitializationException. I will get back to you with the fixed version of the sample by tomorrow with more information.

Regards,
Rajagopal


AL Alia August 31, 2007 03:16 PM UTC

waiting.....


RA Rajagopal Syncfusion Team September 5, 2007 09:09 PM UTC

Hi Alia,

Sorry for the delay in getting back to you.

We have made a few chnages to your sample code and the below modifed sample works fine without any exception
http://www.syncfusion.com/Support/user/uploads/GC_ScrollIssue_6a19479b.zip

Let me know if this helps.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon