Swapping children between parents doesn't show correctly with Realm dotnet binding

I'm trying to use the liveliness of Realm objects to populate and change an SfTreeView.

Mostly works except when I reassign one child(picture) from one place to another.

After changing the picture parent the count of pictures in both places are updated correctly.

Even the Assignee shows the new parent but the actual picture doesn't get removed from the tree(the database is correctly updated)

but it is added correctly in the new parent. Also adding a picture to the old place works.

Of course if I re-query the source it shows everything correctly  but i prefer to the expanded nodes updated correctly  without re-querying.

Do you have any suggestions to make the tree update the removed child without re-querying?

Thanks


Attachment: RealmSfTreeViewTest_cdbf74ec.zip

3 Replies

MR Muthupandy Ramakrishnan Syncfusion Team April 28, 2026 03:39 PM UTC

Hi George DAlessio,
Thanks for reaching out to us.
We have reviewed the reported issue on our end and were able to reproduce it. We require two additional working days to validate the behavior thoroughly. We will update you with further details on or before April 30, 2026.
We appreciate your patience and understanding in the meantime.


Best Regards,
Muthupandy R.



MR Muthupandy Ramakrishnan Syncfusion Team April 30, 2026 11:29 AM UTC

Hi George DAlessio,


Sorry for the inconvenience caused. The validation for the reported issue is still in progress, and our team is actively working on it.
We require two additional working days to validate the behavior thoroughly. We will update you with further details on or before May 05, 2026.
We appreciate your patience and understanding in the meantime.

Best Regards,
Muthupandy R.



SJ Sowntharya Jayamoorthy Syncfusion Team May 5, 2026 01:29 PM UTC

Hi George DAlessio,


Thank you for your patience. We have validated the reported scenario.

When changing a child node from one parent node to another at runtime in SfTreeView, the behavior you are encountering is related to binding live Realm objects to the TreeView.

Internally, reparenting a node involves two operations:

  • Removing the child node from the old parent
  • Adding the same child node to the new parent

 

Since Realm invalidates objects during the remove operation, the TreeView may not correctly process the subsequent add operation when Realm objects are used as the ItemsSource. As a result, the UI does not always reflect the reparenting operation as expected.

Additionally, we verified this behavior with CollectionView, and the same scenario occurs there as well. The collection change notifications are not properly propagated to the ItemsSource bindable property when Realmmanaged objects are removed or reassigned. This appears to be a frameworklevel behavior when working with live Realm objects, rather than an issue specific to SfTreeView.

 

As a workaround, this scenario requires either:

  • A manual update of the ItemsSource (for example, resetting or rebuilding the collection), or
  • Preferably, the use of a detached ViewModel wrapper.


Regards,
Sowntharya J.


Loader.
Up arrow icon