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

SfDataGrid cannot be displayed (exception thrown)

Thread ID:





107300 Feb 24,2013 08:48 AM UTC May 27,2013 05:59 PM UTC WinRT 4
Tags: SfDataGrid
Pascal Hobus
Asked On February 24, 2013 08:48 AM UTC

When I try to integrate the SfDataGrid without any binding to ItemsSource property, the App starts normally, but when I try to bind to my data the App crashes with an unhandled exception. The content of the exception is:

System.NullReferenceException at Syncfusion.UI.Xaml.Grid.SfDataGrid.UpdateRowAndColumnCount(Boolean canGenerateVisibleColumns) at Syncfusion.UI.Xaml.Grid.SfDataGrid.OnApplyTemplate()


The usage of the control is as follows:

<grid:SfDataGrid ItemsSource="{Binding Model.Orders}"/>

The binding works perfectly fine with other DataGrids (eg. from Telerik or with a standard ListBox).


Prakash Selvaraj [Syncfusion]
Replied On February 25, 2013 10:20 AM UTC

Hi Pascal,

Thanks for using Syncfusion products.

We have analysed your query. When you bind an empty collection as ItemsSource to DataGrid, then you have to specify the SourceType for the DataGrid as shown in the following code snippet.

 Code Snippet [C#] :

this.grid.SourceType = typeof(Order);


Please let us know if you need further assistance.


Prakash S.

Ihab Salem
Replied On February 25, 2013 10:26 AM UTC

if the collection is empty then the data grid should not throw an exception for sure..this is a bug

Will this be fixed in a future update?

Prakash Selvaraj [Syncfusion]
Replied On February 26, 2013 11:10 AM UTC

Hi Ihab,

Sorry for the inconvenience caused.

You can avoid the exception by using the snippet given in above response for now. Surely, We will fix this issue in our upcoming release.


Prakash S.

Prakash Selvaraj [Syncfusion]
Replied On May 27, 2013 05:59 PM UTC

Hi Ihab,

We are glad to announce that our  Essential Studio Vol 2 2013 is rolled out and is available for download under the following link




 Please find the release notes in the following link



We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.



Prakash S.


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