Groups | Blog | Home
all groups > dotnet windows forms databinding > september 2006 >

dotnet windows forms databinding : Focus remains locked to masked textbox


AlBruAn
9/16/2006 3:15:02 AM
I have a masked textbox bound to a class in my business objects layer that
displays the original value and allows me to tab to the other controls on my
form. However, if I attempt to modify the value, it refuses to relinquish
focus so I can tab to another control. The MaskInputRejected method doesn't
get fired since I'm careful to make sure I'm entering values that are correct
for the mask I've assigned to the control. Any idea why this is happening
Bart Mermuys
9/17/2006 7:09:15 PM
Hi,

[quoted text, click to view]

Well, this could happen if an Exception occurs while DataBinding persists
the value to your object' property. This Exception may happen during
DataBinding parsing or formatting or the within the property-set of your
object property. So the first thing would be to make sure your property-set
isn't throwing an Exception.

You could also change debugger settings to break on Exception (first-chance)
instead of unhandled, and see (stacktrace) if it reveals something.

---
HTH,
Greetings

AddThis Social Bookmark Button