The reason for the behavior you are experiencing is that your view does not know that the underlying properties have changed. To resolve the situation, you can either use TrackedBindingList
for the navigation properties or implement the INotifyPropertyChanged
interface in your view model.
is a collection type which is integrated with the OpenAccess runtime and supports tracking of the addition and removal of its elements. If you use it for your collection navigation properties, removing or adding an element to them will cause the bound view to update accordingly. Depending on the language you are using and the type of your model, follow one of these tutorials to see how to change the type of collection navigation properties to TrackedBindingList:
- How to: Customize Collections (C# Domain Model)
- How to: Customize Collections (VB Domain Model)
- How to: Customize Collections (C# Fluent Model)
- How to: Customize Collections (VB Fluent Model)
Another option is to implement INotifyPropertyChanged
in your view model. Then, when you complete the deletion of an order, you can raise the PropertyChanged event for the property exposing the customers to your view. If in your case this is
VIEW_CUSTOMERS, then the code would look as follows:
var order = parameter
If you are interested in seeing detailed examples of how to integrate Telerik OpenAccess ORM in your WPF or Silverlight MVVM application please check out our Samples Kit
I hope this helps.
OpenAccess ORM Q3 2013 Beta is available for immediate download in your account. Get it now
and play with the latest bits. See what's new >>