Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to update add/remove items in a Grouped ListView?

$
0
0

Hi. Is there a way to update the objects in a grouped listview. To have 3 groups with 3 items in all of them. Then I try to move a item from group 1 to group 3. I get an error saying that the number of items must be the same after the add/remove in all groups.

Have I missed something or is it not possible?

In the group object I have a ObservableCollection of items.
When calling remove on a item in the first grouping collection I get an error.

The error:

Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (2) must be equal to the number of rows contained in that section before the update (2), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).

If I read this right the list think it had 2 items before I removed one (but I had 3) "The number of rows contained in an existing section after the update (2) must be equal to the number of rows contained in that section before the update (2)".

Is there a way to do this? :)


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>