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. Image for the cookie policy date

How to Keep current selected item after refresh the datasource for SfListView

Hello,

I have a Xamarin Forms app with a SfListView control. I would like to keep the current position in the scroll after refreshing the ItemsSource collection. I already have this behaviour when using the native Xamarin Forms ListView control. But when I decided to use SfListView, after reseting the ItemsSource property, the scroll position is moved to the start.

Is there any way to achieve this behavior?

Thanks in advance.

Joao Paulo Braga

3 Replies

DB Dinesh Babu Yadav Syncfusion Team April 14, 2017 01:55 PM UTC

Hi Joao,  
  
Sorry for the inconvenience caused.  
  
The reported issue “ScrollView offset gets changed when the ItemsSource is reset” has been resolved at our end. As this is forum, we cannot provide patch so, a support incident has been created under your account for providing custom assemblies which includes the fix for the reported issue. Please log on to our support website to check for further updates.        
  
  
Regards,  
Dinesh Babu Yadav 



TV Thijs van Rijswijk November 18, 2020 04:47 AM UTC

Hi,

And how can i achieve this?
Is there a example (MVVM)?

Best regards.

Thijs van Rijswijk


SS SaiGanesh Sakthivel Syncfusion Team November 19, 2020 01:22 PM UTC

Hi Thijs, 
 
Thank you for using syncfusion products. 
 
#Regarding how to keep the current position in the scroll after refreshing the ItemsSource collection 
We would like to inform you that we have prepared the sample as per your requirement and we have attached the demo sample in the following link for your reference. 
 
 
Please let us know if you have any concern. 
 
Regards, 
SaiGanesh Sakthivel 


Loader.
Live Chat Icon For mobile
Up arrow icon