I have a rule defined in a business object which should create/ load a child list based on some input property values.
Taking into consideration the suggestions i have read in this forum i am not using
context.addoutvalue (childlistprop, GetList(param1, param2 ...))
loadproperty (target, childlistprop, GetList(param1, param2 ...)))
In the windows form user interface, i see that the datagrid which should display the child list is not immediately reflecting the changes from the BO childlist. But whenever i change any other field (bound to other BO properties) in form, related or not to the above rule, then the data is correctly displayed in the grid. Can someone give any suggestion ?
It is because Windows Forms will refresh ALL other properties than the one that was changed.
This is the reason Csla.Windows.BindingSourceRefresh exists - to reread the valus from the Property that was changed.
First make sure that your PropertyChangedMode is set to Windows as for Csla 4 the default is Xaml. When property changed mode is Windows the PropertyHasChanged should normally raise the OnUnknownPropertyChanged event.
If this does not help then you may want to call <bo>.OnUnknownPropertyChanged (a PropertyChanged with NULL or String.Empty as propertyname) to signal reread of all properties or add custom code to refresh the binding.
Jonny thanks, calling <bo>.OnUnknownPropertyChanged resolved my problem.
Copyright (c) Marimer LLC