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

sflistview stuck on refreshing when get data from firebase

Thread ID:

Created:

Updated:

Platform:

Replies:

144834 May 24,2019 04:24 PM UTC May 27,2019 01:28 PM UTC Xamarin.Forms 1
loading
Tags: SfListView
kent william
Asked On May 24, 2019 04:24 PM UTC

Hi,
i'm using firebase database.net and sflistview to show the data, i use the .subscribe method and trying to add data if data on firebase changed.

when i try to add data on my mainModel(MVVM), sflistview seems stuck on refreshing data forever but my apps did not throw errors.

is there another way to add data to sflistview?

thanks



Attachment: Files_145ed890.7z

Subburaj Pandian Veluchamy [Syncfusion]
Replied On May 27, 2019 01:28 PM UTC

Hi Kent, 
  
Thank you for contacting Syncfusion support. 
  
We would like to inform you that you can set ItemsSource to SfListView after items added into collection asynchronously in separate thread. Please refer the following code, 
  
 [C#] 
public class Page1 : ContentPage 
{ 
   private void processDataSubscribe(MvvmMessagePostThread dataMessage) 
    { 
            mainModel.Add(dataMessage); 
  
            Device.BeginInvokeOnMainThread(async () => 
            { 
                await Task.Delay(200); 
                sflistView.ItemsSource = mainModel; 
            }); 
    } 
} 
  
If reported issue still occurs, can you please check whether items fetched from DB in ListView loaded event. If no, please share the model sample so that we could analyze the reported query better and provide appropriate solution at our end. 
 
Regards,
Subburaj Pandian V       


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

Live Chat Icon For mobile
Live Chat Icon