Closed gaocan1992 closed 5 years ago
After search, I found this https://forums.xamarin.com/discussion/19114/invalid-number-of-rows-in-section This problem occurs because I called observableCollection.Clear() (not sure why)
Workaround:
while(observableCollection.Count > 0)
observableCollection.RemoveAt(0);
This is happening for CollectionView only. Listview seems to work.
I believe this is a bug with CollectionView itself. not with this control.
@jamesmontemagno Agree, any plan of fix?
I haven't found the fix in Xamarin.Forms 4.0 Release. I will raise an issue on Xamarin.Forms github
I think I found an existing issue: https://github.com/xamarin/Xamarin.Forms/issues/5793
In this code snippet, I got this ex.
NSInternalInconsistencyException Reason: Invalid update: invalid number of items in section 0. The number of items contained in and existing section after the update (1) must be equal to the number of items contained in that section before the update(4), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).