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.
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?

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.

Article ID: Published Date: Last Revised Date: Platform: Control:
7821 07/05/2017 11/15/2018 Xamarin.Forms SfListView
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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