Let me explain my challenge. I have a dataset with a datatable that is assigned to the datacontext. One of the fields is a category. All the category names are in another datatable (one to many relationship).
I want the combobox to display all the names in the categories datatable with the correct selected value from the datacontext datatable. So if I change category, datatable1 will be updated with the selectedValue from the combobox.
I read something about a ObjectDataProvider, but I didnt get it to work. How can I manage to get this to work?
Use like this
Categories being a property in you codebehind.The itemsouce will be populated from the categories table and your selectedvalue will be updated in your datacontext datatable.Hope this helps
EDIT
If your datacontext is a dataset then the selectedvalue should be like