Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does the bound data get updated?
Message
From
19/02/2013 14:43:13
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01566380
Message ID:
01566394
Views:
33
>>I have a textbox which is bound to a field on an entity. I need to run some code whenever the entity's field changes. I've tried calling my code in the textbox's Text_Changed event, but referring to the entity's field at this point in time does not reflect the value entered in the textbox.
>>
>>At what point in time would the entity's field get updated with the value entered in the textbox?
>>
>>Or is there another way to trap/raise an event when the entity's filed changes?
>
>Just adding to John's response:
>
>When the entity property gets updated will depend on the UpdateSourceTrigger setting on the Textbox control. IIRC the default is 'LostFocus' - if you haven't specified otherwise then the entity won't be updated on TextChanged. You may want to set the trigger to 'PropertyChanged' ?

I tried my code in the LostFocus as well but the entity had not yet been updated
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform