Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you bind to a property on a reference object?
Message
From
21/07/2008 15:29:45
 
 
To
21/07/2008 13:38:02
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01331472
Message ID:
01332931
Views:
6
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.

Is your data indeed Linq-to-Sql, where the Association attributes enforce this object-reference-foreign-key thing?

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.






>>I saw your post over on MSDN pointing to the solution you showed me over here on UT.
>>
>>I have posted a few Q's there, but I rarely get many responses. That seems like a busy forum, but I sure like UT a lot. I wish there was more traffic here, because I like the format, and I can really learn a lot from reading the topics that other people are discussing.
>>
>>Also, I wish UT would allow attachment of screen shots. (not that MSDN does).
>>
>>>You're welcome glad I could help.<g>
>
>I was trying to get my second medal back on MSDN<g>
>
>UT has been an invaluable resource for me at times, so I tend to come here first. For most of the topics here, by the time I've read them someone else has already answered them. So I keep an eye on the WPF stuff since it's pretty much just me and Viv and now you with WPF experience here.
>
>I get bored with my own questions sometimes and I also find that I learn a lot by answering other peoples questions. It forces you to look at things a little differently sometimes.
>
>But there is not a lot of traffic here on WPF so I do some posting over on MSDN as well. The MSDN WPF forum is so busy that many posts don't get answered till Marco (the Moderator) gets around to them a week later, he does a good job, but it's just too much volume. C++ stuff over there gets answered almost as fast as here by comparison. It's just too many people with questions on WPF and too few with answers at this point.
>
>One thing on the original subject of this thread... not sure why but I just ran across a case where SelectedValue didn't work, I had to change it to SelectedItem and then it worked fine.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform