|
The change event is firing. It just doesn’t fire immediately after you have made the new selection. It fires when the control property is validates (which would happen when you tabbed to a new control). To make your application behave the way you want, you must set the DataSourceUpdateMode to OnPropertyChanged. I got your application to behave the way that you want by adding these four lines:
unitCBM.Descriptors.Get(originCustomerLookUpEdit).DataSourceUpdateMode = _
DataSourceUpdateMode.OnPropertyChanged
unitCBM.Descriptors.Get(originAddressLookUpEdit).DataSourceUpdateMode = _
DataSourceUpdateMode.OnPropertyChanged
unitCBM.Descriptors.Get(destinCustomerLookUpEdit).DataSourceUpdateMode = _
DataSourceUpdateMode.OnPropertyChanged
unitCBM.Descriptors.Get(destinCustomerLookUpEdit).DataSourceUpdateMode = _
DataSourceUpdateMode.OnPropertyChanged
Here is the enumeration for DataSourceUpdateMode.
|
|
Member name |
Description |
|
http://msdn2.microsoft.com/en-us/library/ms159281.CFW%28en-us,VS.85%29.gif"> |
Never |
Data source is never updated and values entered into the control are not parsed, validated or re-formatted. |
|
http://msdn2.microsoft.com/en-us/library/ms159281.CFW%28en-us,VS.85%29.gif"> |
OnPropertyChanged |
Data source is updated whenever the value of the control property changes. |
|
http://msdn2.microsoft.com/en-us/library/ms159281.CFW%28en-us,VS.85%29.gif"> |
OnValidation |
Data source is updated when the control property is validated,
After validation, the value in the control property will also be re-formatted |
I’ve attached the completed solution.
|