Item disappears on sorting

Hello All,

I am using sfListView control. I displayed the list horizontally. When I click for sorting the item, then sometimes some item get disappear. In binding observation collection item are present but in sfListView ItemTemplate - items are not showing only scroll view comes.

I have added below two lines after observation collection updates,
                AllDayRecords.Refreshing(true);
                AllDayRecords.RefreshView();

AllDayRecords is sfListView name.

Please provide solution for this.

Thanks.

4 Replies

ME Matthew Emson March 9, 2020 11:24 AM UTC

I have also seen this happening. I switched to using a DataSource, and it happens less. In my specific case, I am managing two lists of items that the user can move items between. So sfListview has two instances with different DataSources. I have a method that moves the item (removed from collection 1 and adds to collection 2.) 99% of the time this works, but items sometimes vanish and will then appear when the data changes, sometimes they never reappear.

I have tried a few things, such as inserting extra calls to my method wrapping the NotifyPropertyChanged event, but this often leads to the UI becoming corrupted - the swipe shows up on the wrong side and the swipe reveals a black area rather than my view with buttons.



CS Chandrasekar Sampathkumar Syncfusion Team March 10, 2020 05:46 PM UTC

Hi, 
 
Thank you using Syncfusion products. 
 
@Swati  
 
We have checked the reported query “Item disappears on sorting” from our end. We cannot reproduce the reported issue from our end using simple sample and sorting is working as expected without AllDayRecords.Refreshing(true). The AllDayRecords.Refreshing(true) method can be used when the pulling gesture action is completed. Please let us know the following details you have used in your application and revert us back, 
 
  • Whether ListView is implemented inside PullToRefresh?
  • Whether Sticky GroupHeader enabled in ListView?
 
@Matthew 
 
We have checked the reported query from our end. We suspect you are reporting the crash in below bug report,  
  
  
If yes, we would like to inform that above is the framework issue in Xamarin Version 4.0.0.618610 and above while loading ListView inside ScrollView and you can follow below bug for further updates from Xamarin team. 
 
If no, please share the following details to replicate the issue in our side, 
  1. Xamarin.Forms and ListView version used
  2. Issue replication video if possible
  3. Sample application if possible
 
It will be helpful for us to check on it and provide you the solution at the earliest. 
 
Regards, 
Chandrasekar Sampathkumar


SW swati March 11, 2020 08:06 AM UTC

Hi Chandrasekar,

Thanks for your response.

In our case we used list inside list view. In MainList I have added one label which shows date and the entry for that specific date in horizontal. And we are doing sorting with entry status. We are just changing visiblity of items in sorting. But in some cases entries get disappear. I have attached listview xaml design. Please let me know any other information required.

[One obsevation - The date which has more then 10-12 data entry that list only get disappear, if entry are 1 or less then 3 it is displaying properly. So is that means it taking time for binding the items? ] 
 
  • Whether ListView is implemented inside PullToRefresh? - No 
  • Whether Sticky GroupHeader enabled in ListView? - No
Thanks & regards,
Swati


Attachment: sfListView_sample_401cf439.zip


LN Lakshmi Natarajan Syncfusion Team March 12, 2020 11:01 AM UTC

Hi Swati, 
 
Thank you for the update. 
 
Based on the provided information, we have checked the reported query from our end. We could not able to reproduce the issue in our simple sample. We have prepared a sample using nested ListView and while sorting, ListView updated properly as expected. We have attached the tested sample for your reference. 
 
 
Please check the sample and let us know if you still facing the issue? If not, please modify our sample to reproduce the reported issue and revert us back with following details, 
  • Share issue reproduced sample
  • Share issue video (if possible)
  • Share ViewModel and Model class
  • Share code snippet of sorting
  • Could you please share where you change the IsVisible and RecordVisibility properties
It will be helpful for us to check on it in detail and provide you the solution at the earliest. 
Lakshmi Natarajan 
 


Loader.
Up arrow icon