Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
975
Adding child objects not updating grid
posted

I've got a hierarchical datasource that is and observable collection of "TopLevel" objects. These "TopLevel" objects can in turn contain an observable collection of "ChildLevel" objects.

When I initially create the datasource, there are no child objects. Then once the grid is displayed, I am trying to add a child object to a top level object. Running through the code, once it's all done I can look at the grid datasource and see that the child object is now held under the correct top level item. I also fire an OnPropertyChanged event when the observable colelcion of child objects is added to, but no matter what, the grid does not display the new child item.

If I set the datasource to null and then back to the collection, it then shows the child item in place, so somewhere the grid is not getting the message to refresh.

I've read through lots of posts on adding new records etc... I've added a parameterless ctor to the top and child level objects (although I don't actually call that constructor when creating the object - do I need to do this?), but nothing seems to help.

The grid updates fine when I change properties on objects it's already displaying so what am I missing?

Cheers,

Rob

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    I have reproduced the scenario and it seems like a bug. We are currently investigating the case. Keep your eyes on this thread for a follow-up.

    Alex.

Children