)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load the data from SQLite online database in SfListView?

Platform: Xamarin.Forms |
Control: SfListView |
Published Date: July 5, 2017 |
Last Revised Date: November 15, 2018

SfListView allows you to bind the data from online database with the help of Azure App Service. To achieve this, you need to follow the below steps:

Step 1: Get URL to store the data online.

Step 2: Create table using AppServiceHelpers.

Step 3: Populate the data into the table using the ObservableCollection Items.

Step 4: Bind it to SfListView using SfListView.ItemSource property.

Step 5: Refer the following link to know more about working with Azure App Service.

https://blog.xamarin.com/add-a-backend-to-your-app-in-10-minutes/ 

 

Note: Need to install the following nuget packages to successfully run the application

  • Microsoft.Azure.Mobile.Client(v.2.1.1)
  • Microsoft.Azure.Mobile.Client.SQLiteStore(v.2.1.1)
  • AppService.Helpers (Does not support UWP platform)
  • AppService.Helpers.Forms (Does not support UWP platform)

 

Refer the below code which illustrates, how to initialize the library with the URL of the Azure Mobile App and registering the Model with the client to create a table.

C#

 

Refer the following code which illustrates, how to create a table using AppServiceHelpers and insert items in it.

C#

 

Refer the following code to bind the table contents into the SfListView:

C#

 

XAML:

 

Click here to download the sample. In the sample, click the Fetch button to get the data from online and load into the SfListView.

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
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.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon