PropertyChanged in hierarchy not updating UI

Posts   
 
    
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 20-Sep-2012 15:50:58   

sorry LLBLGen Team, this post can be deleted for it was posted in the wrong section. I have posted it in Databinding and Gui controls as http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=21340


Hello,

We use LLBLGen Pro v3.5 final with the adapter templates on .net4.

I'm quite inexperienced in setting up bindings and hierarchies, but bear with me. I might be somewhat verbose.

I have a WPF MVVM calculation project where we use the following classes (narrowed down): - CalculatieView - CalculatieViewModel which exposes: - public EntityView2<ComponentGroepEntity> ComponentGroepenZichtbaar

This ComponentGroepEntity is extended as:

public partial class ComponentGroepEntity
{
    public EntityView2<ComponentEntity> ComponentView { get; set; }
    public bool Visible { get; set; }
}

In there you see a ComponentEntity and that one is also extended as:

public partial class ComponentEntity
{
    public CalcComponentEntity Component  { get; set; }
}

In that CalcComponentEntity there are two major properties: - Waarde - Vastgezet

btw, You might notice that this is some kind of reversed setup of the following tables: calc - calccomponent - component - componentgroep. I have done that for now to have all components and to get visibility / hiding functionality.

I have setup a view with some DevExpress components which shows all information from ComponentGroepEntities to ComponentEntities to CalcComponentEntity (last two are shown as one row).

When Waarde in a CalcComponentEntity is changed, a 'calculation engine' is fired on the ViewModel which can change other CalcComponentEntities's Waarde (not all). But, these values are not reflected in the View. When I set focus on one of the changed Waarde controls, then it get's updated. It looks like the Binding does not get notified by the property change of Waarde. If have narrowed it down to where it works. The UI still get's updated when I programmatically change a property in ComponentEntity. But when changing one down in the convined CalcComponentEntity the notification is lost. In one variant I have tried listening to _component_PropertyChanged and send that to this.OnPropertyChanged("Component") and some other variants, but I am doing something wrong.

Has anyone some ideas?

Thanks in advance. Niels