Articles in this section
Category / Section

SfDataGrid not rendering with the bound data in Xamarin.Forms

1 min read

If SfDataGrid is not loaded with the bound data source when using it in Xamarin.Forms, please ensure to check whether you had done the below things correctly.

Assembly Referencing

Check whether you had referred the reference assemblies in your sample project as depicted in the below table to use SfDataGrid.

Project

Required assemblies

SampleProject.Portable

pcl\Syncfusion.Data.Portable.dll
pcl\Syncfusion.GridCommon.Portable.dll
pcl\Syncfusion.SfDataGrid.XForms.dll

SampleProject.Droid

pcl\Syncfusion.Data.Portable.dll
pcl\Syncfusion.GridCommon.Portable.dll
pcl\Syncfusion.SfDataGrid.XForms.dll
android\Syncfusion.SfDataGrid.XForms.Android.dll

SampleProject.iOS

pcl\Syncfusion.Data.Portable.dll
pcl\Syncfusion.GridCommon.Portable.dll
pcl\Syncfusion.SfDataGrid.XForms.dll
ios-unified\Syncfusion.SfDataGrid.XForms.iOS.dll

SampleProject.WinPhone

pcl\Syncfusion.Data.Portable.dll
pcl\Syncfusion.GridCommon.Portable.dll
pcl\Syncfusion.SfDataGrid.XForms.dll
wp81\Syncfusion.SfDataGrid.XForms.WinPhone.dll

SampleProject.Windows

pcl\Syncfusion.Data.Portable.dll
pcl\Syncfusion.GridCommon.Portable.dll
pcl\Syncfusion.SfDataGrid.XForms.dll
winrt\Syncfusion.SfDataGrid.XForms.WinRT.dll

SampleProject.UWP

pcl\Syncfusion.Data.Portable.dll
pcl\Syncfusion.GridCommon.Portable.dll
pcl\Syncfusion.SfDataGrid.XForms.dll
UWP\Syncfusion.SfDataGrid.XForms.UWP.dll

 

In case if you are using the export to excel and export to PDF functionalities of SfDataGrid in your application, check whether the below assemblies are referred in your sample project.

Project

Required assemblies

SampleProject.Portable

pcl\Syncfusion.SfGridConverter.XForms.dll
pcl\Syncfusion.Compression.Portable.dll
pcl\Syncfusion.Pdf.Portable.dll
pcl\Syncfusion.XlsIO.Portable.dll

 

SfDataGrid initialization in renderer projects

Currently, an additional step is required for Windows Phone, Windows Phone 8.1, WinRT and iOS projects to initialize custom controls in Xamarin.Forms. You need to initialize the SfDataGridRenderer.

Call the SfDataGridRenderer.Init() in the FinishedLaunching overridden method of the AppDelegate class in the iOS Project as follows.

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{ 
    … 
    SfDataGridRenderer.Init(); 
    … 
}

 

Call the SfDataGridRenderer.Init() in the MainPage constructor of the Windows Phone and WinRT projects as follows.

public MainPage()
{ 
    … 
    SfDataGridRenderer.Init(); 
    … 
}

 

Installed correct version of Xamarin.Forms NuGet

Check whether you had installed the correct version of Xamarin.Forms NuGet packages in your sample projects (Portable and Renderer projects).

Since Xamarin publishes frequent updates in Xamarin.Forms, Syncfusion Xamarin components are compatible with the stable Xamarin.Forms version, which was rolled out at least one week before our monthly service pack or major release.

To know about Syncfusion Xamarin component vs Xamarin.Forms version compatibility, please refer Software Requirements in our Read Me page.

http://files2.syncfusion.com/Installs/{essential_studio_version_number}/ReadMe/Xamarin.html

 

This information is also available as Xamarin.Forms compatibility road map in our user guide documentation.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied