Using latest LLBLGenPro - updated my system last week. Using Net 1.1 for this project and SelfServicing.
I notice that fields mapped on related fields do not automatically update the control that they are bound to when the data in the entity is changed programatically or by editing another control.
I noticed this because I have a grid and on the same form I have controls that provided details of the entity selected in the grid. So the collection is bound to the grid and to these individual controls.
Some of the fields appear in both the grid and the separate controls. I discovered that with the basic entity fields when I edit in the grid and move the cursor to another column the change also occurs in the individual control (and vice versa). However, with fields mapped on related fields this does not happen. This is a Developer Express grid and I can get it to update by using MyGrid.RefreshData. I haven't found a neat way to get the outside controls to update.
In this form I also need to change CompletionDate if the User changes the StartDate. I thought I'd do this by changing the underlying entity so that the change would appear in both the Grid and the outside control. But the CompletionDate is mapped on a related field and the programmatic change does not automatically show up in the grid or the individual control.
I notice that if I change one of the normal Entity fields after I've changed a mapped field, then the mapped field change shows in the control. So it seems that changes to the mapped field are not causing a list changed event to signal the controls to update themselves.
Is this a bug or intended behaviour. Is there any way I can force a list change event to happen other than by changing another non-mapped field?
I'm using the following kind of code for each of these mapped-on-relation fields and calling it from the validated events of the grid and the individual controls to get this to work:
Private Sub newDefectsDtFcast(ByVal newVal As Date)
If Me.BindingContext.Item(Me.BondColl).Current.GetType Is GetType(BondEntity) Then
Dim bondEnt As BondEntity = CType(Me.BindingContext.Item(Me.BondColl).Current, BondEntity)
'Set the entity value (because at the time of the Validated Event
'of the grid the entity value has not been changed so the forced
'list changed notification below would occur before the value changed
'if we did not set it here)
bondEnt.DefectsDtFcast = newVal
'Force a list change notification by changing a non-mapped-on-relation field
'and then changing it back - using a boolean field for convenience
bondEnt.PccSent = Not bondEnt.PccSent
bondEnt.PccSent = Not bondEnt.PccSent
End If
End Sub