>I was hoping you would look into that case where you said you were successful at updating the foreign key field directly on the Job object, rather than updating the Customer object reference on the Job object, as seems to be the required way in Linq-to-Sql.
I have a number of times... I would like to know why it works too!!!! I still have no rational explanation for it.
>Is your data indeed Linq-to-Sql, where the Association attributes enforce this object-reference-foreign-key thing?
Yes, and I see no difference between here and other areas where it has not worked for me. I have to be missing something... I just don't have a clue what it is.
>Anway, I have found my next hurdle if you can think about it with me.... Please see screenshot at
http://www.jordanmachine.com/ComboBox1.jpg>
>You will see one Textbox bound to Job.cust_num and another bound to Job.Customer.custno. I did this just for testing.
>
>When I update the Customer object reference on the Job (via my John Fenton enabled ComboBox), the TextBox bound to Job.Customer.custno updates immediately, BUT the TextBox bound to Job.cust_num is not updating, even AFTER I do SubmitChanges(). I have to exit the form, and then come back, and then it is updated.
>
>>What's also weird is... To do some more testing, I added a Button to pop up a dialog to show Job.cust_num, and it is shows the correct value when I make a new selection in the ComboBox, even without doing a SubmitChanges.
>
>So the dialog will display the right data, but the bound textbox does not.
>
>Something to do with the notify stuff for sure.
SubmitChanges() isn't needed here so you are right it looks like a change notification issue. Are you binding TwoWay? If not try that first.
Linq2SQL implements INotifyPropertyChanged so if it is TwoWay... it should be working.
It does not implement INotifyCollectionChanged which can be a pain sometimes.