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

How to populate SfDataGrid through a data table in Xamarin.Android ?

Platform: Xamarin.Android |
Control: SfDataGrid |
Published Date: June 30, 2017 |
Last Revised Date: June 30, 2017 |
Product Version: 13.4.0.53

To populate SfDataGrid through a DataTable, you must refer the System.Data assembly in your project.

Refer the below steps to add the System.Data assembly in your project.

  1. Right click on the reference of PCL project and click on Add Reference

  1. Choose Framework listed under Assemblies section in the left side panel and select System.Data and click ok.

 

Now, a DataTable collection can be directly bound to SfDataGrid.ItemsSource as shown in the below code example.

MainClass.cs

 

ViewModel_ DataTable.cs

 

Note: View filtering is not supported by SfDataGrid while binding a DataTable collection.

Sample Link: How to populate SfDataGrid through a data table in Xamarin.Android?

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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