SfDataGrid not rendering with the bound data in Xamarin.Forms
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 |
SampleProject.Droid | pcl\Syncfusion.Data.Portable.dll |
SampleProject.iOS | pcl\Syncfusion.Data.Portable.dll |
SampleProject.WinPhone | pcl\Syncfusion.Data.Portable.dll |
SampleProject.Windows | pcl\Syncfusion.Data.Portable.dll |
SampleProject.UWP | pcl\Syncfusion.Data.Portable.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 |
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.