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

new sfDataGrid(); throwing an exception


I'm working on a plugin for ArcGIS (so it's not a standalone app, but a .dll) using the latest Syncfusion controls (v13.2400.0.34, Runtime version 4.0.30319).
In one of the projects, I get an exception on a seemingly innocent line of code:

SfDataGrid grid = new SfDataGrid();

Exception seems to be handled by ArcGIS, so the only piece of information I get is this (no InnerException or anything):
An unhandled exception of type 'System.TypeInitializationException' occurred in ArcMapUI.dll (that's my project, not some ArcGIS binary)

Additional information: The type initializer for 'Syncfusion.UI.Xaml.Grid.SfDataGrid' threw an exception.

I double-checked all the Syncfusion references, they are all of the same version. I have included Syncfusion.Data.WPF and Syncfusion.sfInput.WPF as was suggested by someone in the topic about the similar error in WinRT - that didn't help.

Any ideas on what is this and what to do to fix it?

2 Replies

PA Paul August 21, 2015 09:24 AM UTC

Wrapped that line in try..catch and got my hands on the full exception data.

InnerException: Object reference not set to an instance of an object.
StackTrace for InnerException: 
   at Syncfusion.UI.Xaml.Grid.SR..ctor()
   at Syncfusion.UI.Xaml.Grid.SR.GetLoader()
   at Syncfusion.UI.Xaml.Grid.SR.GetString(CultureInfo culture, String name)
   at Syncfusion.UI.Xaml.Grid.GridResourceWrapper.get_GroupDropAreaText()
   at Syncfusion.UI.Xaml.Grid.SfDataGrid..cctor()

JG Jai Ganesh S Syncfusion Team August 24, 2015 02:21 PM UTC

Hi Paul,

Thank you for using Syncfusion products.

We have analyzed the reported issue in the simple sample. We don’t know the exact scenario to reproduce this issue but based on stack trace, we have fixed this kind of issue in our current source already. We cannot provide the patch through forums. A support incident to track the status of this query has been created under your account. Please log on to our support website to check for further updates.


Please let us know if you have any other queries.

Thank you,

Jai Ganesh S

Live Chat Icon For mobile
Up arrow icon