Binding Problem in conjunction with a MenuItem

  • Thread starter Thread starter Urs
  • Start date Start date
U

Urs

Hi there,

I've got a bounded TextBox and a MenuItem 'Exit Application'.
Every thing works fine as long as I don't select the 'Exit' menu.
When I do it the last changes in the TextBox will not be recognized in the underlaying DataSet. That's why I add a command like
this.BindingContext[dtMeterRead].EndCurrentEdit();
for the MenuItem event handler. OK, now It's working, but ...
.... the Validate event for the TextBox will not be fired!

What's the correct/best way for solving this problem?

Thanks, Urs
 
Try moving focus away from the TextBox by calling .Focus() on some other
control
 
seems to work. Thanks, Urs
Alex Feinman said:
Try moving focus away from the TextBox by calling .Focus() on some other
control

--
Alex Feinman
---
Visit http://www.opennetcf.org
Urs said:
Hi there,

I've got a bounded TextBox and a MenuItem 'Exit Application'.
Every thing works fine as long as I don't select the 'Exit' menu.
When I do it the last changes in the TextBox will not be recognized in the
underlaying DataSet. That's why I add a command like
this.BindingContext[dtMeterRead].EndCurrentEdit();
for the MenuItem event handler. OK, now It's working, but ...
... the Validate event for the TextBox will not be fired!

What's the correct/best way for solving this problem?

Thanks, Urs
 
Back
Top