MAUI Grouped ListView Remove Item Causes Error when more than one Group item exists #26015
Labels
area-controls-listview
ListView and TableView
p/3
Work that is nice to have
platform/android 🤖
s/needs-repro
Attach a solution or code which reproduces the issue
t/bug
Something isn't working
Description
I have a grouped list in C# MAUI MVVC, destination is Andoid
Test data are added like this
Main Page View Model has the bindable collection
public ObservableCollection<GroupData> GroupData { get; } = new ObservableCollection<GroupData>();
and an event on a button when showing the list.
Clicking on it should remove the selected item.
Data are shown with this
Now, when adding ONLY ONE grouped item to the observable collection "Group 1" with the two childs the removing works perfect.
But when adding a SECOND "Group 2" it unfortunately fails with error
Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.'
Steps to Reproduce
see code and description
Link to public reproduction project repository
No response
Version with bug
8.0.93 SR9.3
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
remove
Relevant log output
The text was updated successfully, but these errors were encountered: