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

SFListView - Scrolling item recycling issue

Hello - I am using the SFListView control and when I scroll down the list, I am finding that due to the way each item view is recyled - sometimes properties can be triggered. 

For example, below the IsSelected properties is bound to the checkbox and this is triggered - when it should only be triggered when the checkbox is actually checked. The list will never contain more than 50 items so I was wondering if I could somehow set the ItemsCacheLimit but not entirely sure if this is possible?

(Partial code snipped below)

                    <syncfusion:SfListView ItemsSource="{Binding DateFilterItems}"
                                           Grid.Row="6"
                                           VerticalOptions="FillAndExpand"
                                           HorizontalOptions="Start"
                                           Margin="0"
                                           AutoFitMode="Height"
                                           
                                           IsStickyGroupHeader="True">
                    <syncfusion:SfListView.ItemTemplate>
                        <DataTemplate>
                                <Grid Padding="1, 1"
                                      Margin="5"
                                      VerticalOptions="End">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Label Text="{Binding DisplayName}"
                                               VerticalTextAlignment="Center"
                                               Margin="10,5,10,5"
                                               Grid.Row="0"
                                               Grid.Column="0"/>
                                        <ActivityIndicator IsRunning="{Binding IsBusy}"
                                                           Grid.Column="1"
                                                           Grid.Row="0"/>
                                        <CheckBox IsChecked="{Binding IsSelected}"
                                                  Grid.Row="0"
                                                  Grid.Column="2"/>
                                </Grid>
                        </DataTemplate>
                    </syncfusion:SfListView.ItemTemplate>
                    <syncfusion:SfListView.DataSource>
                      <data:DataSource>
                        <data:DataSource.GroupDescriptors>
                          <data:GroupDescriptor PropertyName="Year"/>
                        </data:DataSource.GroupDescriptors>
                      </data:DataSource>
                    </syncfusion:SfListView.DataSource>
          </syncfusion:SfListView>

1 Reply

MM Mageshyadav M Syncfusion Team October 28, 2019 11:00 AM UTC

Hi Henry, 
Thanks for contacting Syncfusion support. 
 
Based on the provided information, we have checked the mentioned issue “Scrolling list items - reusing issue” and we unable to replicate the issue from our end. We have tested by scrolling and it is working as excepted. We have prepared a sample for the same and also attached a video showing on scrolling the items are re used as excepted. 
 
 
Please check the sample and let us know if you still facing issue?. If not please modify the sample based on your scenario and revert us back with the following details, 
  • Issue reproducing video (if possible).
  • Syncfusion and Xamarin.Forms version.
 
It will be helpful for us to check on it and provide you the solution at the earliest. 
 
Regards 
Gokul Saravanan 


Loader.
Live Chat Icon For mobile
Up arrow icon