So, in our example, we end up with: Note that you have to keep the Selected Item property if you want to be able to update the Product property Category Parent.Hopefully, this clears up the mystery around why Selected Item doesn't work as expected with ORM layers like NHibernate.
If you want the trigger to fire as soon as the contents are changed, you need to set the property value to "Property Changed".)Now for the meat of this post - the Combo Box for the Category List.
Creating a Combo Box that displays the list is quite simple.
For the Selected Item and Selected Value bindings, I do not set a mode – this is because “Mode=Two Way” is the default.
Two Way means that we want to update the property on the View Model when the selection changes, and if the property on the View Model changes we want to update the Selected Item/Selected Value on the Combo Box. I've been intrigued by computers since I was 12, staying in at recess to code QBASIC on the old Apple II. NET Access Denied Active MQ Active MQ-Camel Attribute Behavior C# Camel Cassandra Combo Box Connecting Cross-Field Data Binding Data Context Display Member Path Double Click Enumerate Event Example Framework Element GAC IData Error Info INotify Property Changed Instances Items Source Karaf Lucandra Lucandra.
To set this up, let's define Category objects and Product objects like this: Category--ID--Category Name--Products (An IList)Product--ID--Product Name--Category Parent (A Category Object)In the detail form for the Product, you want to have a Combo Box that has as its Items Source the list of Categories.
When a Product is selected, the Combo Box should change the selection to align with the Category Parent property of the Product.
Let's tackle the second issue (changing the Category Parent value of the selected Product) first.
The Selected Item property, when bound to the correct property of a Product, will allow the user to make updates.
The Selected Value property defines which property of the bound data object will be used to get the value.
The Selected Value Path defines the property of the List Object to match.
This is not news, as it works very similarly in Win Forms.